Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Porting a system 5 streams app to linux

by devnul (Monk)
on Apr 29, 2005 at 00:10 UTC ( #452498=note: print w/ replies, xml ) Need Help??


in reply to Porting a system 5 streams app to linux

I'm a bit confused by what you are asking here....

So you have a C app which forks and the forked process runs an arpitrary system/backtick app? Does the logging happen in the forked process or the parent process? (I assume the forked process here).

The last thing is, being unfamiliar with sysV streams, what sort of information is it passing back that you need to get?... Just the process name it wants to run or something more? Wouldn't the parent have to know that before forking?

I may have misunderstood much of what you have said and if so I will revise this post as needed.


dEvNuL


Comment on Re: Porting a system 5 streams app to linux
Re^2: Porting a system 5 streams app to linux
by suaveant (Parson) on Apr 29, 2005 at 03:51 UTC
    The C app is a basically simple logging daemon, which listens on a pipe.

    The major application is a job management system (Perl), which monitors for events and maintains resource and dependency information. When the everything is in place for a job (file came in to process, another job finished, whatever) then a new job is spawned which runs commands to process the job.

    The main monitor logs to this pipe, and when children are forked off they send some initialization data down the pipe to identify themselves and also redirect their stderr stdout to this pipe for logging.

    Where sysV streams come in, apparently even though both the parent and children are writing to the same copy of the pipe connection that they got through the fork, somehow the C app is able to figure out which process each incoming line is coming from.

                    - Ant
                    - Some of my best work - (1 2 3)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://452498]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2014-12-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (84 votes), past polls