Hi, I am calling a linux process from php as:

$cmd = `/blah/something_startup start &;`;

It's seems fairly obvious that php is waiting for something to be returned. It just kind of hangs around waiting and won't move to the next line of code.

So, to work around it I had to do

$cmd = `/blah/something_startup start&; echo something;`;

Is there another way around this (the above work around seems rather cheesy).

Thanks

the same thing happens with system and exec

I'm not sure, exactly. I'd have to play with it a bit.

Have a look at the documentation here: http://us3.php.net/manual/en/function.exec.php

There's several ways to do what you want in terms of executing a program, but I don't know if they wait for return codes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.