OS X Shell no threading? 
Author Message
 OS X Shell no threading?

When you create a new shell and execute a unix command the app sending
the command hangs until an errorcode is returned. Error 0 for ok.
Even if you execute the shell from a thread within the app, the app
still does nothing until the new shell exits.
I'm not sure if this behaviour is depended on the sort of unix command
being executed. I'm want to use wget. Any suggestions? Or should this be
a feature request?

Joop



Mon, 09 Feb 2004 16:04:37 GMT  
 OS X Shell no threading?

Quote:

> I'm not sure if this behaviour is depended on the sort of unix command
> being executed. I'm want to use wget. Any suggestions? Or should this be
> a feature request?

Make a feature request for an asyncron shell run command.

And try if you can start a new shell which will start your app.
Than it works in background but you don't get the result.

Mfg
Christian

--
PLZ Suche
Das einzige Postleitzahlensuchprogramm fr Mac OS X

Download unter <http://plz.macsw.de>



Mon, 09 Feb 2004 19:12:12 GMT  
 OS X Shell no threading?

Quote:

> When you create a new shell and execute a unix command the app sending
> the command hangs until an errorcode is returned. Error 0 for ok.

Technically it "blocks" rather than "hangs", but yes.

Quote:
> Even if you execute the shell from a thread within the app, the app
> still does nothing until the new shell exits.

Yep.  Threads are cooperative, and the Unix commands are uncooperative..

Quote:
> I'm not sure if this behaviour is depended on the sort of unix command
> being executed.

Not really, though if you're sufficiently clever at Unix, you can
execute your command in the background.  IIRC, you do this by appending
"&" to the command, and also redirecting its output (to a file, or to
/dev/null, or whatever is appropriate).

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Mon, 09 Feb 2004 22:36:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Python threads: backed by OS threads?

2. Shell within a thread

3. Shell within a Thread?

4. Help: Executing shell commands under OS X PB.

5. Quoting with GAWK in OS/2 cmd Shell

6. Shelling from forth to *OS

7. Shelling from Forth to *OS

8. from c-shell to OS/2 REXX

9. os.environ conflicts with my shell

10. os.shell, recursion, encryption

11. os.shell, recursion, encryption

12. OS X embedded Wish Shell hangs

 

 
Powered by phpBB® Forum Software