exec() arguments get confusing
From: Bert (bad_bert_at_hotmail.com)
Date: 05/28/05
- Previous message: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Paul Pluzhnikov: "Re: exec() arguments get confusing"
- Reply: Paul Pluzhnikov: "Re: exec() arguments get confusing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 May 2005 07:13:39 -0700
Hi,
I'm calling exec() to make a SSH connection to one of my network's
computer using execlp("ssh","ssh","compname",...,(char*)0), where the
... stands for further arguments one would pass to 'ssh'.
The problem I'm getting is that about 40% of the time i make such a
call, 'ssh' reports that "ssh: unknown host" as if it took the first
argument argv[0] (which is usually the name of the executable) as the
host I'm trying to connect to instead of using 'compname'.
The weird thing is that it's not systematic and using
execlp("ssh","compname",...,(char*)0) won't work.
Any ideas?
(I'm on Linux 2.6.8)
Thanks in advance for any help
- Previous message: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Paul Pluzhnikov: "Re: exec() arguments get confusing"
- Reply: Paul Pluzhnikov: "Re: exec() arguments get confusing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|