test for running process

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
bill lam

test for running process

Post by bill lam »

I want to know if a linux process is already runnning, eg, I could use
ps -e |grep soffice
However under wine, the output can not be read (mentioned in my last email), is
there any other alternatives?

regards,
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: test for running process

Post by vitamin »

bill lam wrote:I want to know if a linux process is already runnning, eg, I could use
ps -e |grep soffice
However under wine, the output can not be read (mentioned in my last email), is
there any other alternatives?

regards,
Since win32api does not have anything like that you can't do that in Wine. Unless you create winelib app - then you do the standard POSIX stuff, which is outside the scope of Wine.
James McKenzie

test for running process

Post by James McKenzie »

bill lam wrote:
I want to know if a linux process is already runnning, eg, I could use
ps -e |grep soffice
However under wine, the output can not be read (mentioned in my last
email), is there any other alternatives?
What exactly are you attempting to do? Look for a program running under
Wine or the actual Wine programs?

I use:

ps -aux | grep wineserver
to find wineserver application information

and
ps -aux | grep wine
to find running instances of programs

This should work under both Linux and Mac.

James
bill lam

test for running process

Post by bill lam »

James McKenzie wrote:
bill lam wrote:
I want to know if a linux process is already runnning, eg, I could use
ps -e |grep soffice
However under wine, the output can not be read (mentioned in my last
email), is there any other alternatives?
What exactly are you attempting to do? Look for a program running under
Wine or the actual Wine programs?
When running program inside wine, I want to test if *Linux soffice* is already
running. If that program were run under linux, I could run a shell script and
read the stdout. But it seems not possible under wine.

regards,
James McKenzie

test for running process

Post by James McKenzie »

bill lam wrote:
James McKenzie wrote:
bill lam wrote:
I want to know if a linux process is already runnning, eg, I could use
ps -e |grep soffice
However under wine, the output can not be read (mentioned in my last
email), is there any other alternatives?
What exactly are you attempting to do? Look for a program running
under Wine or the actual Wine programs?
When running program inside wine, I want to test if *Linux soffice* is
already running. If that program were run under linux, I could run a
shell script and read the stdout. But it seems not possible under wine.
Correct. I don't think you can invoke a linux shell from within Wine,
nor do I *think* this should be possible.

James
bill lam

test for running process

Post by bill lam »

James McKenzie wrote:
Correct. I don't think you can invoke a linux shell from within Wine,
nor do I *think* this should be possible.
I invoke linux version of soffice and python from within wine everyday. Only
that I cannot get the result back in stdout.

regards,
Locked