site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 28, 2007, at 3:21 PM, Michael Smith wrote: I may be making too big a deal of all this but I can't figure out how to do something like: postgres <args> | rotatelogs <args> from launchd. If I put that command in a simple bash shell script, I *believe* it will not work. The signal will go to bash and bash will not pass it along to the children. If the latter, then that's not a good way to do it. Have the output from the daemon go to the input of another process. Thanks, pedz _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Dec 28, 2007, at 12:03 PM, darwin-dev-request@lists.apple.com wrote: There's something missing from what you're asking here; specifically, what signal are you talking about? launchd uses SIGTERM to signal the process should gracefully shutdown. Then launchd does a SIGKILL when it gets impatient. I could trap the signal and pass it along myself... but, $! gives the pid for the last process in the pipe (rotatelogs). That is not what I need to signal. I need the signal passed to postgres. And, in fact, it would be nice if the signal did NOT pass to rotatelogs. I'd like for it to stop when its input closes and not before then. Are you actually trying to pass output from postgres to rotatelogs, or just have the two die cleanly together? Yes, I am trying to pass output from postgres to rotatelogs. rotatelogs is a cute way to have your log files age. Anyone have any suggestions of how to do this? What is "this"? This email sent to site_archiver@lists.apple.com