Re: unix shell script ignores 'exit' when in function that is piped to tee
From: CV (or254498_at_hotmail.com)
Date: 01/11/05
- Next message: CV: "Re: How do I disable shell globbing in a script?"
- Previous message: Rakesh Sharma: "Re: inserting CR/NL (with sed?) in some ASCII files"
- In reply to: Lew Pitcher: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Next in thread: Dan Mercer: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Reply: Dan Mercer: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Jan 2005 17:54:24 +0100
Lew Pitcher wrote:
> What you didn't take into account is that the pipe causes the left hand side
> of the command to be executed in a child process, and the stdout of that child
> process is fed into the stdin of the parent process that's running the right
> hand side of the command.
There is still something that I don't understand here.
If there is a child process it should have a different process-id,
right ?
But I tried printing out the pid to a file from within the
child (echo $$>>funpid) and the result was the same pid as
the parent !?
Cheers CV
- Next message: CV: "Re: How do I disable shell globbing in a script?"
- Previous message: Rakesh Sharma: "Re: inserting CR/NL (with sed?) in some ASCII files"
- In reply to: Lew Pitcher: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Next in thread: Dan Mercer: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Reply: Dan Mercer: "Re: unix shell script ignores 'exit' when in function that is piped to tee"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|