in reply to A suicidal parent OR death of a forking server

@MidLifeXis:

Definitely not a homework assignment. I can understand the reasons for the question though.

The above code is just one side of the program. The other side has a RS232 serial interface( and that is why I mentioned "enable queuing of commands" ). Apologies for not mentioning this earlier : my intentions were never to mislead the monks! I thought it is best to tackle one issue at a time instead of going into the details.

I do not know how others dealt with things when facing forking and threads. Personally I have been using Perl for quite some time now and can understand it to a fair degree. _However_, when dealing with forks/threads, it requires a "fundamental" shift in the way we think. "Fundamental" might be apt when I look at it from this of the fence. When I reach the other side, I might see it differently. But until then, it is still fundamental for me :)

@BrowserUk (Apostle) :
When dealing with RS232 interfaces, there is indeed a problem of "waiting" and then there is this perennial issue of ensuring that the interface is alive. I will have to look into the various scenarios and see how I can implement queuing.

Many thanks everyone.
I still haven't opened my dictionary to check the meanings of the words here. I think I will be occupied for quite some time just going through the replies and understanding what is being said!

  • Comment on Re: A suicidal parent OR death of a forking server