Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternate for rexec()

Status
Not open for further replies.

deepa0

Technical User
Mar 23, 2002
2
IN
Hi

I am using rexec() system call in my program(on Machine A) to dump a message into a file on machine B. It works fine.

Still, I would like to know if we have any other alternate for rexec().

Cheers
Deepa
 
Sure.

You can write a server on B and a client on A that does this. Writing such clients in Perl or C isn't all that hard.

You can also use uucp over tcp/ip. That has some advantages of delivery and reporting.

But for simple tasks like this I often make use of the existing client/server tools. You are already using rexec, but did you ever think about using mail to an alias that runs a script to strip out headers and leave the body in a file? Or a printer on B that does the same thing? These kind of scripts are easy to write. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Thanks for the idea!....I thought of using the client-server idea much before using rexec....but just for dumping few logging messages in a file on machineB(which is already overloaded with too many processes), I didnt want to go ahead with this idea.
But, in the rexec, i felt that the password-change of machine B's login will result in the modification of my source code(i can still avoid modifying the source code, by dynamically changing the passwd). And also, it was consuming more msecs for executing this system call.

Regards
Deepa
 
Well, for logging, you might also be able to take advantage of syslog itself..

But mail or a printer is a good choice. Simple, no passwords, pretty reliable. Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top