Created
November 2, 2011 09:39
-
-
Save torgeir/1333268 to your computer and use it in GitHub Desktop.
how to message daemon process - bash pipe as stdin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create pipe, tail it, and read from stdin in a program | |
mkfifo namedPipe; tail -f namedPipe | while true; do read msg; echo $msg; done; | |
# now send messages from another shell | |
echo "start" > namedPipe | |
echo "stop" > namedPipe | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment