Discuss script in Iphone at the Free Toolchain Software - Hackint0sh.org; Hello,
I have write a small script a .sh file
I satrt it in the ...
-
Senior Professional
Array
script in Iphone
Hello,
I have write a small script a .sh file
I satrt it in the phone using mobileterminal.
My problem is that when I push the home butom to go in other app, the script stop working. I would like to have it still running when I go in other app.
How can I do this, is there other way to have my small script running when I work on the Iphone. Maybe I must do something other than a script .sh ???
Help is welcome.
Thanks
-
-
Senior Professional
Array
you need to put a "&" at the end of your script's name when you call it. This will dissociate it from your terminal session and it will run till it finishes, you restart or you kill it. So if your script's name is "foo.sh", you would type
foo.sh &
That space before the "&" is intentional. Be careful - if your script goes haywire you won't know unless you know about ps or top ( hint: try typing "man top" in mobileterminal)
"Are you into S&M?"
"Well...I'm a Red Sox fan. Does that count?"
Go Sox!
-
-
Senior Professional
Array
Really a big big thanks.
Yes I know about ps and kill.
Thanks very much
-
You might need to use the unix command "nohup" It stops processes from being killed when a shell exits.
Ex.
nohup sh foo.sh &
(that is, if nohup is installed on the iPhone. I'm not sure if its a shell command or an executable. Maybe it's part of csh? I don't remember....)
-
-
Ahhh... yes. There is a nohup command on the iPhone. Probably gets installed as part of the BSD subsystem.
(If you want to know precisely what it does, check the man page on your Mac or Linux box)
-vfxdude
Similar Threads
-
By fr0g in forum Free Toolchain Software
Replies: 7
Last Post: 09-16-2012, 02:16 AM
-
By mooselander in forum iPhone OS 3.x
Replies: 0
Last Post: 08-12-2009, 05:29 PM
-
By katanapod in forum iPhone Developer Exchange
Replies: 3
Last Post: 05-26-2009, 04:29 PM
-
By rated-r in forum PwnageTool
Replies: 0
Last Post: 07-24-2008, 03:49 AM
-
By Donni in forum iPhone "2G" (Rev. 1)
Replies: 2
Last Post: 02-09-2008, 09:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks