execvp() on Solaris

M

mikeSpindler

I've seen it addressed in searching, but not specifically what is
recommended to get around it. On Linux where I did my development all
was fine. But then going to Solaris for the target I found I couldn't
resolve the errors wrt execvp(). It's apparently not syntax, but I
could be wrong. Any other thoughts on how to get execvp() working
and/or how to cat a file in a new window without bringing tkinter into
the discussion?

My example:
os.system("xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&")

Thank you!
Mike
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

mikeSpindler said:
I've seen it addressed in searching, but not specifically what is
recommended to get around it. On Linux where I did my development all
was fine. But then going to Solaris for the target I found I couldn't
resolve the errors wrt execvp(). It's apparently not syntax, but I
could be wrong. Any other thoughts on how to get execvp() working
and/or how to cat a file in a new window without bringing tkinter into
the discussion?

My example:
os.system("xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&")

I'm not sure I understand the question. You ask about os.execvp, but
then bring up an example for os.system, which is something entirely
different.

As for this os.system call: it should work fine if xterm is in the path,
if DISPLAY is set, and if ./log/DATAFILE exists (and if tail is in the
path, which it should be).

Regards,
Martin
 
A

Andrew MacIntyre

resolve the errors wrt execvp(). It's apparently not syntax, but I
could be wrong. Any other thoughts on how to get execvp() working
and/or how to cat a file in a new window without bringing tkinter into
the discussion?

My example:
os.system("xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&")

AFAICS, this should be
os.system('xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&')

But os.system() is not os.execvp()...

You don't elucidate what your problems with execvp() are..., but if what
you have works on Linux but not Solaris I'd have to wonder about the
environment setup for the account:-
- path?
- library path (for X11 libs)?
- different shell?

With execvp(), the shell shouldn't be involved unless you explicitly
execute it so you won't get shell variable expansion or asynchronous
execution (the '&' above).
 
M

mikeSpindler

You might not be aware - os.system calls execvp. Thus, when I call
os.system I'm getting execvp errors when I run on Solaris. Thank you
for the responses so far. I'd love to hear how to resolve the known
issue of Python not using the system's execvp. THANK YOU!
 
A

Aaron Bingham

mikeSpindler said:
You might not be aware - os.system calls execvp. Thus, when I call
os.system I'm getting execvp errors when I run on Solaris. Thank you
for the responses so far. I'd love to hear how to resolve the known
issue of Python not using the system's execvp. THANK YOU!
What are the exact error messages you are seeing? Without them it is
impossible to diagnose your problem.

Aaron
 
E

Eric Brunel

mikeSpindler said:
I've seen it addressed in searching, but not specifically what is
recommended to get around it. On Linux where I did my development all
was fine. But then going to Solaris for the target I found I couldn't
resolve the errors wrt execvp(). It's apparently not syntax, but I
could be wrong. Any other thoughts on how to get execvp() working
and/or how to cat a file in a new window without bringing tkinter into
the discussion?

My example:
os.system("xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&")

Thank you!
Mike

Stupid question first: does the command work in a shell? Because AFAIK, there is
no xterm installed by default under Solaris. The terminal is called dtterm and
is located in /usr/dt/bin.

I tried the exact same thing you're doing on Solaris 2.7 with Python 2.1 and got
no error at all:

Python 2.1.1 (#13, Dec 10 2003, 10:31:34)
[GCC 3.2.2] on sunos5
Type "copyright", "credits" or "license" for more information. 'tail -f /var/log/samba/log.smb &')
0

So I can only repeat what others already told you: please send the exact error
messages you get, or we won't be able to help you much...
 
A

Andrew MacIntyre

You might not be aware - os.system calls execvp. Thus, when I call
os.system I'm getting execvp errors when I run on Solaris. Thank you
for the responses so far. I'd love to hear how to resolve the known
issue of Python not using the system's execvp. THANK YOU!

os.system() calls system() (in Modules/posixmodule.c). How any given
libc implements system() is a vendor issue, but it doesn't surprise me
that it would use execvp().

Without the exact error message, as other replies have also requested,
we're no wiser.

I also don't comprehend your assertion about there being a known issue of
Python not using the system's execvp(). If your gripe is that Lib/os.py
implements os.execvp() in terms of execv()/execve(), then information
about why you believe that is a problem would also be appreciated.
 
P

Piet van Oostrum

(e-mail address removed) (mikeSpindler) (m) wrote:

m> I've seen it addressed in searching, but not specifically what is
m> recommended to get around it. On Linux where I did my development all
m> was fine. But then going to Solaris for the target I found I couldn't
m> resolve the errors wrt execvp(). It's apparently not syntax, but I
m> could be wrong. Any other thoughts on how to get execvp() working
m> and/or how to cat a file in a new window without bringing tkinter into
m> the discussion?

m> My example:
m> os.system("xterm -geometry 120x20 -e \"tail -f ./logs/DATAFILE\"&")

Leave out the \"'s:
os.system("xterm -geometry 120x20 -e tail -f ./logs/DATAFILE&")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,209
Messages
2,571,088
Members
47,687
Latest member
IngridXxj

Latest Threads

Top