<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>LINUX programming Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'LINUX programming' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Mon, 01 Dec 2008 19:03:46 -0700</pubDate>
    <lastBuildDate>Mon, 01 Dec 2008 19:03:46 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>ndbm.h and support for C++</title>
      <link>http://www.programmersheaven.com/mb/Linux/382023/382023/ndbmh-and-support-for-c++/</link>
      <description>hi,&lt;br /&gt;
&lt;br /&gt;
I try to use ndbm.h header file and its methods...&lt;br /&gt;
&lt;br /&gt;
I wrote a simple test program that just makes a call to&lt;br /&gt;
&lt;br /&gt;
dbm_open();&lt;br /&gt;
&lt;br /&gt;
when I try to compile with gcc, it works ok.&lt;br /&gt;
&lt;br /&gt;
But with g++ it throws some compiler errors.&lt;br /&gt;
&lt;br /&gt;
when I compile it with gcc and link with g++, the result ios ok........&lt;br /&gt;
&lt;br /&gt;
I need a code to be compiled with c++ compiler...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I searched on the net and came across some pages, the links to which I have posted below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.nntp.perl.org/group/perl..../msg22654.html"&gt;http://www.nntp.perl.org/group/perl..../msg22654.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.nntp.perl.org/group/perl..../msg22653.html"&gt;http://www.nntp.perl.org/group/perl..../msg22653.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
are these links helpful for my purpose....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
looking for some sugestions................&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.........specially some patches&lt;br /&gt;
regards!&lt;br /&gt;
Sandeep Mohapatra&lt;br /&gt;</description>
      <pubDate>Wed, 19 Nov 2008 00:00:15 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>to check license of the tools being used in Linux machine</title>
      <link>http://www.programmersheaven.com/mb/Linux/381982/381982/to-check-license-of-the-tools-being-used-in-linux-machine/</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
     I am basically a VLSI design engg.... , Working on the tool LEC. May I know how to check the how many licenses of the tool we are having and who are holding those licenses&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
veena&lt;br /&gt;</description>
      <pubDate>Mon, 17 Nov 2008 22:41:16 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Ncurses printing to a printer</title>
      <link>http://www.programmersheaven.com/mb/Linux/381593/381593/ncurses-printing-to-a-printer/</link>
      <description>I have searched and can not find any help on sending a string or anything to a printer using Ncurses. surly i am not the only one to want to do this. by the way the terminal and the printers will be on dumb terminals like the Wyse, and the OS used is linux enterprise server 10 (just in case.&lt;br /&gt;
&lt;br /&gt;
Thank You, Mike&lt;br /&gt;</description>
      <pubDate>Thu, 06 Nov 2008 07:06:00 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Error while running example in tcl script</title>
      <link>http://www.programmersheaven.com/mb/Linux/381453/381453/error-while-running-example-in-tcl-script/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I am working on ns-2.33 on linux RedHat 9.0 machine. I am trying to run an example for FTP application on wired network having 4 nodes. When I run using ns sample_2.tcl I get following error:&lt;br /&gt;
&lt;br /&gt;
invalid command name "Queue/ms"&lt;br /&gt;
while executing&lt;br /&gt;
"Queue/ms create _o22 DropTail"&lt;br /&gt;
invoked from within&lt;br /&gt;
"catch "$className create $o $args" msg"&lt;br /&gt;
invoked from within&lt;br /&gt;
"if [catch "$className create $o $args" msg] {&lt;br /&gt;
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {&lt;br /&gt;
delete $o&lt;br /&gt;
return""&lt;br /&gt;
}&lt;br /&gt;
global errorInfo&lt;br /&gt;
error "class $..."&lt;br /&gt;
(procedure "new" line 3)&lt;br /&gt;
invoked from within&lt;br /&gt;
"new Queue/$qtype $args"&lt;br /&gt;
("default" arm line 5)&lt;br /&gt;
invoked from within&lt;br /&gt;
"switch -exact $qtype {&lt;br /&gt;
ErrorModule {&lt;br /&gt;
if {[llength $args] &amp;gt; 0} {&lt;br /&gt;
set q [eval new $qtype $args]&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
set q[new $qtype Fid]&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
intserv {&lt;br /&gt;
set qtyp..."&lt;br /&gt;
(procedure "_o3" line 14)&lt;br /&gt;
invoked from within&lt;br /&gt;
"$ns simplex-link $n0 $n2 5Mb 2ms DropTail"&lt;br /&gt;
(file "sample_2.tcl" line 13)&lt;br /&gt;
&lt;br /&gt;
I don't understand how to deal with this error. Please help me with this. It is urgent! Please!&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Fri, 31 Oct 2008 14:36:10 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>how to compile and run a tcl script in ns-2</title>
      <link>http://www.programmersheaven.com/mb/Linux/381449/381449/how-to-compile-and-run-a-tcl-script-in-ns-2/</link>
      <description>Hello all,&lt;br /&gt;
&lt;br /&gt;
I am new to linux &amp;amp; ns-2 simulator. I am using RedHat 9.0 and ns-2.33. I got a code for ad-hoc routing and tried running it giving command "tclsh" and my file name, but it gave error as:&lt;br /&gt;
&lt;br /&gt;
invalid command name new &lt;br /&gt;
while executing &lt;br /&gt;
"new Simulator"&lt;br /&gt;
invoked from within "set ns_ [new Simulator]"&lt;br /&gt;
&lt;br /&gt;
can anybody plz help me with this? Am I using the wrong command? I just wrote this code and tried running it. Am I supposed to write anything else in any other file? What is the command to compile? and to execute?&lt;br /&gt;
&lt;br /&gt;
This is very urgent. Plz help&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;</description>
      <pubDate>Fri, 31 Oct 2008 10:35:31 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>printing in kernel</title>
      <link>http://www.programmersheaven.com/mb/Linux/381432/381432/printing-in-kernel/</link>
      <description>i am a beginner kernel programmer. i need to write a kernel code for a new system call called&lt;br /&gt;
int sys_printstr(void *buf);&lt;br /&gt;
This system call returns the usual success/failure codes. The buf argument that it gets is an&lt;br /&gt;
encoded string as follows:&lt;br /&gt;
• the first byte in buf contains the length of the string in bytes&lt;br /&gt;
• the bytes that follow in buf contain the actual string, excluding the terminating null it should correctly printk this encoded string which is passed from user-land.&lt;br /&gt;
&lt;br /&gt;
any clue/suggestion?&lt;br /&gt;
&lt;br /&gt;
thanks in advance..&lt;br /&gt;
&lt;br /&gt;
-Nancy&lt;br /&gt;</description>
      <pubDate>Thu, 30 Oct 2008 19:53:40 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Linux based Device Design</title>
      <link>http://www.programmersheaven.com/mb/Linux/381277/381277/linux-based-device-design/</link>
      <description>Giayee Embedded Handheld Device Design House&lt;br /&gt;
     ---- Embedded Hardware &amp;amp; Software Design and Development for WinCE/Linux based Handheld Device.&lt;br /&gt;
&lt;br /&gt;
Giayee Technology Co.,LTD. is a wholly-owned subsidiary of Embest Info&amp;amp;Tech Co., LTD. (Embest) and is located in ShenZhen China. It was formed out of the Embest Handheld Mobile Device department in 2007.&lt;br /&gt;
 &lt;br /&gt;
Embest is :&lt;br /&gt;
       The only join venture ARM has invested in within China.&lt;br /&gt;
       ARM Tools Key Partner.&lt;br /&gt;
      Microsoft Windows Embedded Silver Partners. &lt;br /&gt;
&lt;br /&gt;
Giayee continuously strive to be the best by fostering a quality culture based on teamwork, responsibility, accountability, communication and integrity. Our mission is to provide you with professional Embedded Mobile Handheld Device Solutions and Embedded Device Development Services. &lt;br /&gt;
&lt;br /&gt;
More Infomation :       &lt;a href="http://www.giayee.com"&gt;www.giayee.com&lt;/a&gt;&lt;br /&gt;</description>
      <pubDate>Mon, 20 Oct 2008 05:29:13 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>How to write email notification program</title>
      <link>http://www.programmersheaven.com/mb/Linux/381246/381246/how-to-write-email-notification-program/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I`d like to know how to go about writing an email notification program.&lt;br /&gt;
&lt;br /&gt;
I know that there are many such programs available but what I would like to do is this: monitor for incoming mails, upon receiving an email from a specific email address, read the content of email (which is one word) and depening on the email content, execute a command.&lt;br /&gt;
&lt;br /&gt;
Or, if anyone can tell me about an existing email notification program with this feature, then thats also fine.&lt;br /&gt;
&lt;br /&gt;
I am using Ubuntu and the Mail Transfer Agent,Mail Delivery Agent and Mail User Agent will be whatever Ubuntu has. I`d just like to know the steps that i have to carry out to do the above.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Fri, 17 Oct 2008 04:45:34 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Problems with raw sockets and three way hand shake</title>
      <link>http://www.programmersheaven.com/mb/Linux/378263/378263/problems-with-raw-sockets-and-three-way-hand-shake/</link>
      <description>Hi&lt;br /&gt;
I've been trying to program a tool that does a 3way handshake, but I'm having problems. I send a syn packet to a server, it repleys with a syn,ack, but when it comes back to my computer the kernel sends a rst back.&lt;br /&gt;
Is there any way to tell the kernel that a program is on that port and will use raw sockets to answer it.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <pubDate>Tue, 07 Oct 2008 14:16:32 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Wich programming-language?</title>
      <link>http://www.programmersheaven.com/mb/Linux/376724/376724/wich-programming-language/</link>
      <description>Hi all&lt;br /&gt;
&lt;br /&gt;
I'm going to build an application, there must be controlled by touch. This user-interface must be on linux, without the user to see the linux-platform, but only control the things on my interface (including www)&lt;br /&gt;
&lt;br /&gt;
What is the best way to start, what program must i choose to write in, i consideret flash, but with flash i cant open an web-site inside my application.&lt;br /&gt;
&lt;br /&gt;
Im a bit confused at the moment, so hope you understand my question, and can help me out. When i know what language to write in, I'll figure out how to do &lt;img src="http://www.programmersheaven.com/images/Community/grin.gif" width="15" height="15" alt="" /&gt;&lt;br /&gt;</description>
      <pubDate>Wed, 01 Oct 2008 23:59:18 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>insert module in linux kernel</title>
      <link>http://www.programmersheaven.com/mb/Linux/375123/375123/insert-module-in-linux-kernel/</link>
      <description>hi all&lt;br /&gt;
i want to know how simple module is inserted in kernel?&lt;br /&gt;
how that module is compiled?&lt;br /&gt;
how 2 make makefile of that module?&lt;br /&gt;
plz help me.&lt;br /&gt;</description>
      <pubDate>Thu, 11 Sep 2008 06:58:41 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>linux kernel programming</title>
      <link>http://www.programmersheaven.com/mb/Linux/374943/374943/linux-kernel-programming/</link>
      <description>hi all&lt;br /&gt;
i m doing my BE proj. "ARP Poisoning Prevention &amp;amp; DEtection" for that i need to learn linux kernel programming &amp;amp; arp code in linux kernel. If any one have Linux kernel code for ARP or doc.Abt linux kernel programming then give me URL &lt;br /&gt;</description>
      <pubDate>Sat, 06 Sep 2008 02:00:01 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>POSTFIX help wanted</title>
      <link>http://www.programmersheaven.com/mb/Linux/374793/374793/postfix-help-wanted/</link>
      <description>Hi all&lt;br /&gt;
I am a novice Linux user. We use IBM Universe BASIC on a Linux platform.&lt;br /&gt;
An administrator configured POSTFIX, then I googled until I figured out how to use the thing, manually. Now I'm trying to send email from a Universe program. It almost works perfectly. Here is the source code:&lt;br /&gt;
&lt;br /&gt;
DATA ""&lt;br /&gt;
DATA "."&lt;br /&gt;
EXECUTE 'SH -c "nail antons@leobs.co.za -r antons@leobs.co.za -s testing123"'&lt;br /&gt;
&lt;br /&gt;
DATA will put "keyboard input" on a stack, until the system 'prompts' for it, and then it just takes it from the stack. The first DATA is just an ENTER keypress, the second is supposed to be CTRL-D, but the full stop does the same, except that is does not attach junk to the email.&lt;br /&gt;
Instead, the message body contains ".", which is fine kind of, but I would like it to be 100%.&lt;br /&gt;
It's almost like when the Linux shell runs, it does not care anymore about DATA or any other Universe command, because control is now at a different level. To be honest, I'm not even sure why the "." works.&lt;br /&gt;
Anyone, how can I 'feed' the CTRL-D along with the rest of the email data to the Linux level (oterwise it just hangs, waiting for it..)??&lt;br /&gt;
I know this is kind of a weird one, but any insights or advice would be great.&lt;br /&gt;
Thanks a lot&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 02 Sep 2008 07:49:34 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Wvdial problem</title>
      <link>http://www.programmersheaven.com/mb/Linux/374530/374530/wvdial-problem/</link>
      <description>Hi guys i  am new user of linux but this is not my first post to this forum .I have posted approximately 20 posts earlier  in c++.I have returned to this forum after approx. 7 -8 months .I was having an important exam .I have installed red hat linux in my computer .But i cannot connect to the net in a linux platform.I have a phone which is like one of those nokia phone which can be connected to the usb port to connect to the net .The phone is Tata Indiacom an indian mobile privider. I downloaded a wadial and wvstreams.I uncompressed the wvstreams and wvdial with the command &lt;br /&gt;
&lt;pre class="sourcecode"&gt;tar xvzf wvdial-1.60 &lt;/pre&gt;&lt;br /&gt;
as root .The files have been extracted to /root &lt;br /&gt;
Here is the file hierchy of my dir. in linux&lt;br /&gt;
&lt;a href="http://pastebin.com/m4a951a48"&gt;http://pastebin.com/m4a951a48&lt;/a&gt;&lt;br /&gt;
In all the online tutorial about using wvdial it nis said to type &lt;br /&gt;
&lt;pre class="sourcecode"&gt;wvdial /etc/wvdial.conf &lt;/pre&gt;&lt;br /&gt;
but as far as i think this should be different for my linux because it wvdial.conf is situated in a different folder.I can't understand what will be the next course of action&lt;br /&gt;
Please guys help me to connect to the net on linux otherwise switching between linux and windows  to connect to the net is very irritating&lt;br /&gt;</description>
      <pubDate>Tue, 26 Aug 2008 02:35:59 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Cleaning up the cache and dedicating it to one application</title>
      <link>http://www.programmersheaven.com/mb/Linux/374126/374126/cleaning-up-the-cache-and-dedicating-it-to-one-application/</link>
      <description>Hi there,&lt;br /&gt;
for a long time I have been thinking if it is possible to free up the cache from anything else that may be occupying it and thus dedicate it explicitly to a specific program which does a lot of math. Is it possible?&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 06:33:57 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Intel Turbo Memory and Linux</title>
      <link>http://www.programmersheaven.com/mb/Linux/374125/374125/intel-turbo-memory-and-linux/</link>
      <description>Hi Guys, &lt;br /&gt;
Intel has released its Intel Turbo Memory a 1-2GB of Memory close to the CPU which is about to do a lot of nice things from caching a lot of data and files saving hard-disk energy consumption and also work like a cache speeding up processes and making the system more responsive. &lt;br /&gt;
&lt;br /&gt;
Originally it is designed for the Windows VISTA, in an attempt to make the a bit more popular because nobody want them as far as I know. The question is :&lt;br /&gt;
&lt;br /&gt;
Is it possible to use such a memory in Linux and overload malloc e.t.c. in order to USE it as a higher LEVEL cache e.t.c. Does anybody know anything? Anybody tested/benchmarked it? Do not tell me that it makes the system more responsive because this is crap. It is the same as when you take vitamins and feel more energetic. One should test heavy mathematical libraries like Goto BLAS or ATLAS BLAS and see if there is any performance increase. &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 06:31:53 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>A program which tells you at the end the pick memory it allocated</title>
      <link>http://www.programmersheaven.com/mb/Linux/374122/374122/a-program-which-tells-you-at-the-end-the-pick-memory-it-allocated/</link>
      <description>I have a memory demanding application. It is possible to call some Linux system call or something so that the program can track down the memory consumption while it is running? At the end, I would like the program to tell me what was the pick memory it allocated.&lt;br /&gt;
&lt;br /&gt;
Of course I can track all the memory allocations I do and program someway a memory pool e.t.c. This is too advanced for me to do at this moment. Maybe later this will be the way I will grand memory allocation to some class e.t.c. possibly by overloading the operators new and delete in C++. At the moment however I do not want to run top in order to track my application. &lt;br /&gt;
&lt;br /&gt;
Any ideas?&lt;br /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 06:10:22 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Embed Movies in .pdf LaTeX Documents</title>
      <link>http://www.programmersheaven.com/mb/Linux/374121/374121/embed-movies-in-pdf-latex-documents/</link>
      <description>Hi, I am writing all my presentations in LaTeX. LaTeX creates .pdf files. I would like to be able to include certain movies in the .pdf files which could then be played by one single click. Is this possible to be done?&lt;br /&gt;
&lt;br /&gt;
If not, then is it possible to have a link in the LaTeX/pdf document which will execute a command like: mplayer mymovie.mp4 outside the pdf file?&lt;br /&gt;
&lt;br /&gt;
If not, then what can I do?&lt;br /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 06:06:46 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>a program which waits and executes every 0.1 seconds</title>
      <link>http://www.programmersheaven.com/mb/Linux/374120/374120/a-program-which-waits-and-executes-every-01-seconds/</link>
      <description>Hi,&lt;br /&gt;
sorry about the subject but I do not really new how to express what I have in mind. So, what I would like to learn how to do in Linux, is to create a program which will run in the background and every a predefined number of milliseconds it will execute. There are many applications in mind. One such is a reminder. When the clock time / date becomes something then the program reminds you something you have written. I know programs like that exists but I do not know how to do it. &lt;br /&gt;
&lt;br /&gt;
My application is somewhat different. I have written an OpenGL based application when I visualize an object and rotate it around. While I am rotating it, I would like the program to be able every 50-100 msecs to dump .png files on the disk so then I can make a movie out of it to be able to show it to presentations. The reason I need that is because just a few .png files cannot help the audience understand what I am talking about, they have to see the real thing. The best way is to show them short movies. Of course I could make the program rotate automatically and every few steps I could dump a .png file. But this is not what I want since there are some areas I would also like to zoom in e.t.c. You cannot program all of that to be done automatically. &lt;br /&gt;
&lt;br /&gt;
I tried to do a program which in a for loop reads the time using sys/time.h and every 1 second it prints a message, but this eats up 99% of CPU power. This is not what I want. It should behave something like a daemon, and checking the time every few milliseconds should be a very CPU light process. I know that there are many Linux programs which do it, like GmailNotify e.t.c. I do not know though how.&lt;br /&gt;
&lt;br /&gt;
Can anybody help me?&lt;br /&gt;</description>
      <pubDate>Wed, 13 Aug 2008 06:01:19 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Creating an AppBAr (Docking Window) for in linux</title>
      <link>http://www.programmersheaven.com/mb/Linux/373988/373988/creating-an-appbar-docking-window-for-in-linux/</link>
      <description>Hi ya all,&lt;br /&gt;
Am new on this site and welcomes are in order. Been doing quite a lot of windows programming but now am forced to move to Linux to do a certain project of mine. Now, I need to create an App Bar for Linux just Like the windows task bar. It should be able to dock to one side of the desktop and everything else should give way including the desktop icons and any other windows so it's not an 'always on top' kind of thing. No window should be below it. Can someone point me to how it's done? Windows uses some API to register the app bar, what about Linux? And while we are at it where can i get good material on Linux programming in general and programming it's API in particular?&lt;br /&gt;
&lt;br /&gt;
regards.&lt;br /&gt;</description>
      <pubDate>Wed, 06 Aug 2008 07:11:36 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>select system call and signal handlers</title>
      <link>http://www.programmersheaven.com/mb/Linux/373862/373862/select-system-call-and-signal-handlers/</link>
      <description>Hi all,&lt;br /&gt;
I have this question regarding usage of select system call and signal handler.&lt;br /&gt;
We can use select to check for I/O readiness of a fds. At the same time we can have signal handlers for SIGIO signal.&lt;br /&gt;
I suppose I make a signal handler for SIGIO signal and at the same time I am calling select on the same fd(device on which I am expecting I/O).&lt;br /&gt;
Now on I/O readiness signal handler will be called as well as select will get unblocked. &lt;br /&gt;
My question is when the SIGIO occurs, "Is there any guarantee of order in call of signal handler and select return?"&lt;br /&gt;
&lt;br /&gt;
TIA &lt;br /&gt;
tan...</description>
      <pubDate>Sat, 02 Aug 2008 02:06:27 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>I want to build a great linux-based os</title>
      <link>http://www.programmersheaven.com/mb/Linux/373527/373527/i-want-to-build-a-great-linux-based-os/</link>
      <description>Okay, I do want to learn the programming to build a linux based OS so i can have something for my own personal needs, also how would I go about to make  linux access windows type API's or something like WINE to make it run Windows apps and games w/out getting in trouble? I must know what i need to learn to  be able to do this.&lt;br /&gt;
&lt;br /&gt;
My plan for this linux OS is to do something that would be able to run Windows apps/games and straight up linux stuff. I'm an absolute noob to programming but I want to learn it so bad.&lt;br /&gt;
I want to program</description>
      <pubDate>Mon, 21 Jul 2008 03:39:37 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Catching keyboard meessages/input to a GTK(sharp) textview widget</title>
      <link>http://www.programmersheaven.com/mb/Linux/373377/373377/catching-keyboard-meessagesinput-to-a-gtksharp-textview-widget/</link>
      <description>Hi&lt;br /&gt;
I am trying to create a custom widget based on gtk textview (the gtk# bindings for C#). The purpose is to enable writing my local language Urdu in textview instead of English. I am unable to find how can I hack the keyboard input before it appears on screen (so I change the key values like a to ا and b to ب etc). I am a beginner so plz suggest me it this regards. Obviously I want to do it in c# (mono has Gdk.Keyboard, Gdk.Keymap and some other such classes, but I am unable to figure out a way to get the pressed key's value and change it before it is passed to textview buffer). At last here is the example my friend done in system.windows.forms textbox.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;using System;
using System.Drawing;
using System.Drawing.Design;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Windows.Forms.Design;


namespace UrduCtrl
{
	enum KeyboardStates
	{
		kbNormal=0,
		kbShift=1,
		kbCtrl=2,
		kbAltGr=3
	}

	public class UrduTextPropertyEditor: UITypeEditor
	{
//		public override object EditValue( 
//			System.ComponentModel.ITypeDescriptorContext context, 
//			System.IServiceProvider provider, object value) 
//		{ 
//			IWindowsFormsEditorService frmsvr = (IWindowsFormsEditorService)provider.GetService(ty
peof(IWindowsFormsEditorService));
//			if(frmsvr == null)
//				return null;
//
//			UrduTextPropertyEditorDlg dlg= new UrduTextPropertyEditorDlg();
//			dlg.EditedText = (string) value;
//
//			//dlg.ShowDialog();
//			frmsvr.ShowDialog(dlg);
//
//			return (string) dlg.EditedText;
//		}

//		public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
//		{
//			if (context!=null &amp;amp;&amp;amp; provider!=null)
//			{
//				IWindowsFormsEditorService edSrv= (IWindowsFormsEditorService)provider.GetService(ty
peof(IWindowsFormsEditorService));
//				if (edSrv!=null)
//				{
//					UrduTextPropertyEditorDlg dialog= new UrduTextPropertyEditorDlg();
//					if (value is String)
//						dialog.EditedText= (string)value;	
//					if (edSrv.ShowDialog(dialog)==System.Windows.Forms.Di
alogResult.OK)
//						value= dialog.EditedText;
//					dialog.Dispose();
//					dialog= null;
//				}
//			}
//			return value;
//		}

		public override System.Drawing.Design.UITypeEditorEditStyle 
			GetEditStyle(System.ComponentModel.ITypeDescriptor
Context context) 
		{ 
			// We will use a window for property editing. 
			return UITypeEditorEditStyle.Modal; 
		}

		public override bool GetPaintValueSupported( 
			System.ComponentModel.ITypeDescriptorContext context) 
		{ 
			// No special thumbnail will be shown for the grid. 
			return false; 
		} 
	}

	/// &amp;lt;summary&amp;gt;
	/// Summary description for Class1.
	/// &amp;lt;/summary&amp;gt;
	[System.Security.Permissions.PermissionSet(System.
Security.Permissions.SecurityAction.Demand, Name="FullTrust")]
	public class UrduTextBox: System.Windows.Forms.TextBox
	{
		private int WM_CHAR = 0x102;
		private int WM_KEYDOWN = 0x100;
		private int WM_KEYUP = 0x101;
		private bool m_bIsUrdu;
		private KeyboardStates kbState;
		private Hashtable UrduPhonetic;
		private char  charSingleQuote= Convert.ToChar(39);

		public UrduTextBox()
		{

			this.Font = new System.Drawing.Font("Urdu Naskh Asiatype", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
			this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
			//this.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
			this.m_bIsUrdu= true;
			kbState= KeyboardStates.kbNormal;

			
			UrduPhonetic= new Hashtable();
			UrduPhonetic['a']=new Key(0x0627, 0x0622, 0x0623);
			UrduPhonetic['b']=new Key(0x0628, 0x0628);
			UrduPhonetic['c']=new Key(0x0686, 0x062B);
			UrduPhonetic['d']=new Key(0x062F, 0x0688);
			UrduPhonetic['e']=new Key(0x0639, 0x0651);
			UrduPhonetic['f']=new Key(0x0641, 0x64D);
			UrduPhonetic['g']=new Key(0x06AF, 0x063A);
			UrduPhonetic['h']=new Key(0x06BE, 0x062D);
			UrduPhonetic['i']=new Key(0x06CC, 0x0670);
			UrduPhonetic['j']=new Key(0x062C, 0x0636);
			UrduPhonetic['k']=new Key(0x06A9, 0x062E);
			UrduPhonetic['l']=new Key(0x0644, 0x0628);
			UrduPhonetic['m']=new Key(0x0645, 0x64B);
			UrduPhonetic['n']=new Key(0x0646, 0x06BA);
			UrduPhonetic['o']=new Key(0x06C1, 0x06C3);
			UrduPhonetic['p']=new Key(0x067E, 0x064F);
			UrduPhonetic['q']=new Key(0x0642);
			UrduPhonetic['r']=new Key(0x0631, 0x0691);
			UrduPhonetic['s']=new Key(0x0633 , 0x0635);
			UrduPhonetic['t']=new Key(0x062A , 0x0679);
			UrduPhonetic['u']=new Key(0x0626 , 0x0621);
			UrduPhonetic['v']=new Key(0x0637, 0x0638);
			UrduPhonetic['w']=new Key(0x0648, 0x0624);
			UrduPhonetic['x']=new Key(0x0634, 0x0698);
			UrduPhonetic['y']=new Key(0x06D2, 0x06D2);
			UrduPhonetic['z']=new Key(0x0632, 0x0630);
			UrduPhonetic['0']=new Key(0x0030, Convert.ToInt16(')'));
			UrduPhonetic['1']=new Key(0x0031, Convert.ToInt16('!'));
			UrduPhonetic['2']=new Key(0x0032, Convert.ToInt16('@'));
			UrduPhonetic['3']=new Key(0x0033, Convert.ToInt16('#'));
			UrduPhonetic['4']=new Key(0x0034, Convert.ToInt16('$'));
			UrduPhonetic['5']=new Key(0x0035, Convert.ToInt16('%'));
			UrduPhonetic['6']=new Key(0x0036, Convert.ToInt16('^'));
			UrduPhonetic['7']=new Key(0x0037, Convert.ToInt16('&amp;amp;'));
			UrduPhonetic['8']=new Key(0x0038, Convert.ToInt16('*'));
			UrduPhonetic['9']=new Key(0x0039, Convert.ToInt16('('));
			UrduPhonetic['=']=new Key(0x03D, 0x02B);
			UrduPhonetic['-']=new Key(0x002D, 0x0640);
			UrduPhonetic[',']=new Key(0x060C, 0x064E);
			UrduPhonetic['.']=new Key(0x06D4, 0x0650);
			UrduPhonetic['/']=new Key(0x002F, 0x061F);
			UrduPhonetic['\\']=new Key(0x0674);
			UrduPhonetic[';']=new Key(0x061B, 58);
			UrduPhonetic['[']=new Key(0x64C);
			UrduPhonetic[']']=new Key(0x0652);
			UrduPhonetic[charSingleQuote]=new Key(0x2018, 0x201C);
			UrduPhonetic['~']=new Key(0x2019, 0x201D);
			UrduPhonetic[' ']=new Key(32, 0x200C);
			UrduPhonetic['&amp;lt;']=new Key(0x064E);


		}

		protected override void WndProc(ref Message m)
		{			
			if (m.Msg == WM_CHAR)
			{				
				if(kbState== KeyboardStates.kbCtrl)
				{
					if(m.WParam == (IntPtr) 32)
					{
						this.m_bIsUrdu= !(this.m_bIsUrdu);
						m.WParam= (IntPtr) 0;
						base.WndProc(ref m);
						return;
					}
				}

				if(m_bIsUrdu)
				{
					//MessageBox.Show("Test");
					char strChar= (char) m.WParam;
					strChar= Char.ToLower(strChar);

					if (kbState== KeyboardStates.kbShift)
					{
						if (UrduPhonetic.ContainsKey(strChar))
						{
							m.WParam= (IntPtr) ((UrduCtrl.Key) UrduPhonetic[strChar]).shift;
						}
					}
					else if (kbState== KeyboardStates.kbAltGr)
					{
						if (UrduPhonetic.ContainsKey(strChar))
						{
							m.WParam= (IntPtr) ((UrduCtrl.Key) UrduPhonetic[strChar]).altgr;
						}
					}
					else if (kbState== KeyboardStates.kbNormal)
					{
						if (UrduPhonetic.ContainsKey(strChar))
						{
							m.WParam= (IntPtr) ((UrduCtrl.Key) UrduPhonetic[strChar]).normal;
						}
					}
				}			
			}
			else if (m.Msg == WM_KEYDOWN)
			{				
				if((Control.ModifierKeys &amp;amp; Keys.Shift) == Keys.Shift )
				{
					this.kbState= KeyboardStates.kbShift;
				}
				else if(((Control.ModifierKeys &amp;amp; Keys.Control) == Keys.Control) &amp;amp;&amp;amp; (((Control.ModifierKeys &amp;amp; Keys.Alt) == Keys.Alt)))
				{
					this.kbState= KeyboardStates.kbAltGr;
					char strChar= (char) m.WParam;
					strChar= Char.ToLower(strChar);
				}
				else if((Control.ModifierKeys &amp;amp; Keys.Control) == Keys.Control )
				{
					this.kbState= KeyboardStates.kbCtrl;
				}
			}
			else if (m.Msg == WM_KEYUP)
			{		
				if(kbState == KeyboardStates.kbAltGr)
				{
					if(!(((Control.ModifierKeys &amp;amp; Keys.Control) == Keys.Control) &amp;amp;&amp;amp; (((Control.ModifierKeys &amp;amp; Keys.Alt) == Keys.Alt))))
					{
						this.kbState= KeyboardStates.kbNormal;
					}
				}
				else if(kbState == KeyboardStates.kbCtrl)
				{
					if((Control.ModifierKeys &amp;amp; Keys.Control) != Keys.Control )
					{
						this.kbState= KeyboardStates.kbNormal;
					}
				}
				else if(kbState == KeyboardStates.kbShift)
				{
					if((Control.ModifierKeys &amp;amp; Keys.Shift) != Keys.Shift)
					{
						this.kbState= KeyboardStates.kbNormal;
					}
				}
			}
			base.WndProc(ref m);
		}

		
		[Category("Appearance"), 
		Description("Text property for Urdu edit control."), 
		Editor(typeof(UrduTextPropertyEditor), typeof(UITypeEditor))]
		public override string Text
		{
			get
			{
				return(base.Text);
			}
			set
			{
				base.Text = value;
				this.Invalidate();
			}
		}
	}
}&lt;/pre&gt;&lt;br /&gt;
Regards&lt;br /&gt;</description>
      <pubDate>Sun, 13 Jul 2008 18:36:23 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>Confiure serial server via embedded device using telnet</title>
      <link>http://www.programmersheaven.com/mb/Linux/372601/372601/confiure-serial-server-via-embedded-device-using-telnet/</link>
      <description>I want to confiure embedded device2(see below figure) from pc through embedded device1.&lt;br /&gt;
&lt;br /&gt;
setup is&lt;br /&gt;
&lt;br /&gt;
                               &lt;br /&gt;
pc---(ethernet cable)---embedded device1====(console cable)===embedded device2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the PC, using telnet I am login to embedded device1. Then from the telnet, I am executing picocom(same &lt;br /&gt;
&lt;br /&gt;
as minicom or hyperterminal) on the device /dev/tts/0 of embedded device1. Then on the picocom terminal i &lt;br /&gt;
&lt;br /&gt;
can only view the console bootup messages of the embedded device2 but i cannot write or configure the &lt;br /&gt;
&lt;br /&gt;
embedded device2 through picocom.&lt;br /&gt;
&lt;br /&gt;
Can any one help to solve this issue.&lt;br /&gt;</description>
      <pubDate>Wed, 11 Jun 2008 23:52:18 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
    <item>
      <title>CGI scripting using c shell</title>
      <link>http://www.programmersheaven.com/mb/Linux/371841/371841/cgi-scripting-using-c-shell/</link>
      <description>I'm trying to make a CGI script that does something based on the value of a specific posted parameter.  The parameter's name is 'question.'&lt;br /&gt;
&lt;br /&gt;
How can you get POST parameters using a c shell script?&lt;br /&gt;
&lt;br /&gt;
I found a script that should be accessing the posted parameter but I'm a bit confused by it.  What is the 'zzz'?&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
#!/bin/csh -f

setenv HOME '/stu2/karabi/public_html/menu'
setenv PATH '/global/apps/mira/bin:$PATH'


echo "Content-Type:text/plain"
echo ''

setenv v "`/bin/cat`" /global/apps/mira/bin/mira /stu2/karabi/public_html/menu/menu.m &amp;lt;&amp;lt; zzz
(sh_answer "$v")
/q
zzz
&lt;/pre&gt;</description>
      <pubDate>Mon, 12 May 2008 13:21:51 -0700</pubDate>
      <category>LINUX programming</category>
    </item>
  </channel>
</rss>