It is currently Sat Jul 04, 2020 2:26 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: RunProgram()
PostPosted: Wed Feb 18, 2004 9:59 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Dec 08, 2003 7:50 pm
Posts: 154
Location: Germany
Hi!

This question was ask in the german forum from somebody. I tried it out and got the same problem. It's the following:

Using the RunProgram() function in Linux starts the external program but doesn't quits it. So at least until the PB program is quited. Here is an example code:

Code:
S$="hallo"

If RunProgram("/bin/echo",S$,"",1) = 0
    MessageRequester("Error","Programm konnte nicht gestartet werden!",0)
    End
EndIf

Repeat
ForEver


So it opens the echo programm and then goes into a endless loop. The Flag of the RunProgram() function is set to "Wait until the launched program quits". So normally the endless loop should start after the echo program quits. But calling "ps aux" in a console shows that the echo program runs. ([echo <defunc>])

If I quit the PB programm with strg+c the echo programm also stops. But this is of course not wanted. So could this be a bug of PB or is it a "bug" in my thoughts?

best regards,
Christian


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 20, 2004 3:08 pm 
Offline
New User
New User

Joined: Fri Feb 20, 2004 3:00 pm
Posts: 3
Location: /Germany/Ulm
Hi Christian, after I did'nt get an answer in the pure-board.de, I thought to post my problem here might give a solution,... but then I saw you even translated and posted my problem, thank you :)

maybe we will get some help here..


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 20, 2004 6:41 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Dec 08, 2003 7:50 pm
Posts: 154
Location: Germany
Hi piie! :)

I hope so, but unfortunataly it does not seem so, yet. But we will see ... it's really a strange thing!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Feb 21, 2004 12:11 am 
Offline
New User
New User

Joined: Fri Feb 20, 2004 3:00 pm
Posts: 3
Location: /Germany/Ulm
I hope somebody have a idea how to handle this. If not, we should talk to the developer, or? Because this is not just a little bug, I think. Under Linux you need nearly in every program the help of other linux-tools. And it is not very nice to see thousands of <defunc> Threads running....


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Feb 23, 2004 4:56 pm 
Offline
User
User
User avatar

Joined: Fri Apr 25, 2003 5:18 pm
Posts: 68
Location: Netherlands
Its not a problem of RunProgram or of anything !

Also a [ DEFUNC ] is nothing bad, its only a fact that
the forked process could not find the root process to kill it.

AND because you probably run the program during comilation
you see the Forked process..nothing bad !!

you see probably in your PS -->

./purebasic.exe
echo [ defunc ]


Your program runs just fine when you run it standalown
and kill it with a CTRL-C.

Pbdep.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Feb 24, 2004 12:34 am 
Offline
New User
New User

Joined: Fri Feb 20, 2004 3:00 pm
Posts: 3
Location: /Germany/Ulm
hm.. the problem is, that i started to build a tool with wich you can change the volume (therefor i use >aumix<) or run other applications by using a joypad and after i compiled and ran it, i do a few volumechanges and my processlist shows as much defunc aumix processes as volumechanges i did..
This tool have to do much more than maybe 1000 volume changes, before it will be stopped. And it doesnt look nice if you have so much useless threads in your ps. I also think, that these 1000 processes will speed down my cpu.

_________________
Linux... or do you have the engine of a lawn mower in your sports car?!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye