This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

tclsh fork

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

tclsh fork

Post by Ofloo »

how do i fork a tcl script in tclsh but i wana out put some stuff before i fork it into the background .. so not sur if its an option to use screen or

> file & in bash ..
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

exec or open
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

dude i wana fork the whole script not some binairy file that i am executing
XplaiN but think of me as stupid
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

"dude" do you know what fork means? It launches a new process, except in C it will copy over the file descriptor table and vm area and all that. If you're looking for the exact same fork() call in tcl, you're not going to find it. Your options are open/exec, which does the same thing as fork except doesn't copy over the file descriptors and vm area.

Also, you said "file & in bash" which led me to believe this is a stand-alone script or something that you want executed in the background, and thus open/exec is the solution. If that's not what you meant, why don't you try explaining it again and use more words.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

oh sorry hmm u gave me an idea tnx for the info ..
XplaiN but think of me as stupid
Locked