[Tutor] pass argument into running program *outside* of program

James jtp at nc.rr.com
Thu Aug 21 22:34:12 CEST 2008


All,

I have a program that I am writing that will be shared amongst
multiple users. This program sits in the background as a daemon and
'does' things (consider it a black box). I want users to be able to
SSH into the Linux box that is running the code and then do something
like this:

$ program.py addMe <username> <var2>

In other words, a user will 'pass' something (an argument, for a lack
of better words) into the program that is *already* running, and the
program will modify its behavior based on that command.

I guess this is equivalent to saying "/etc/init.d/httpd restart",
although I imagine the init script is actually telling the program to
stop and restart.

Thoughts on how to go about doing this, or if it's at all possible? :)

Thanks!
-j


More information about the Tutor mailing list