Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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
Node Status?
node history
Node Type: note [id://452498]
[james28909]: i forgot how to link my scratch pad
[Lady_Aleena]: [pad://]
[james28909]: my scratchpad
[james28909]: and like i say, is just an example, not working code, but hopefully you understand what i mean. :)
[james28909]: and like i say, it would be alot of work to get around renaming 3 subs haha
[Lady_Aleena]: Well, you would have to add the file munging and a lot more.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-05-24 05:20 GMT
Find Nodes?
    Voting Booth?