Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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.

  • Comment on Re: Porting a system 5 streams app to linux

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-01-19 16:43 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (55 votes). Check out past polls.