07 March 2016, 21:04 | #1 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
|
Disconnect from shell
How do you do to disconnect your program from the current shell and continue running it in the background?
The idea would be to only start running in the background if certain conditions are met, like a unix daemon. The CED editor does something this, it even allows you to close the shell you started it from while it is running. |
08 March 2016, 09:19 | #2 |
Registered User
Join Date: May 2010
Location: Helsinki, Finland
Posts: 1,341
|
Try
run >NIL: command |
08 March 2016, 09:41 | #3 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
|
|
08 March 2016, 11:22 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,630
|
I've done this in the past. As far as I remember, I did something like:
add extra code section to start of program/seglist which detaches the following sections from the seglist and then creates a new process based on the detached sections, then exits. There may be some details about setting standard input/output for the new process also, I don't remember. |
08 March 2016, 17:11 | #5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Redirecting output to NIL: like ajk says works, so if your program doesn't need to print anything in the shell before it detaches, that's your simple solution.
There's also a program on Fish 399, TrackDisplay by Olaf Barthel, which shows how to programmatically detach from the CLI, allowing you to close it afterwards. |
08 March 2016, 20:09 | #6 |
Registered User
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
|
Thanks for the TrackDisplay example, that's exactly what I want to do!
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Clear background color for Shell window- Shell-StartUp | fc.studio | support.Apps | 13 | 25 March 2022 18:52 |
A lua shell for FS-UAE | lallafa | support.FS-UAE | 10 | 14 August 2020 20:35 |
remote shell howto | ovale | support.WinUAE | 18 | 26 April 2015 17:50 |
Shell help? | madman | support.Apps | 5 | 24 June 2011 22:32 |
Shell Replacement | amiga | request.UAE Wishlist | 6 | 22 January 2009 19:44 |
|
|