LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-14-2004, 09:02 AM   #1
DD32
LQ Newbie
 
Registered: May 2004
Distribution: Slackware Linux 9.1
Posts: 4

Rep: Reputation: 0
Forking under Slackware 10


i've run into a slight problem, i've got a dual bot of XP and Slackware 10 installed sucessfully... however i'vejust found i don't have FORK, i did select to install everything, and i have no idea whree to getit from....

does anyone know how/where i can source it from... i thought it was in my slackware 9.1 install.. but i must be mistaken?

otherthan that it's rock solid and runing great(ok apache is playing games.. but thats anoher story)

any help?

-=DD32=-
 
Old 07-14-2004, 09:07 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Could you be more precise ? As far I know 'forking' is an action to create a child process from a main program
 
Old 07-14-2004, 09:15 AM   #3
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
There isn't a program [Ff][Oo][Rr][Kk] on neither Slackware 9.1 or 10.0. I have a full install (including extra packages) of both on different partitions and the only thing I can find is a help file from tclX.
 
Old 07-14-2004, 09:49 AM   #4
netmask
Member
 
Registered: Jul 2004
Location: Sherbrooke, Quebec, Canada, North America, World, Milky Way
Distribution: Gentoo
Posts: 103

Rep: Reputation: 16
Are you talking about this? http://sourceforge.net/projects/fork/
 
Old 07-14-2004, 11:36 PM   #5
DD32
LQ Newbie
 
Registered: May 2004
Distribution: Slackware Linux 9.1
Posts: 4

Original Poster
Rep: Reputation: 0
aha yes, thats the sourceforge link i was after,
fork is a program used to execute a command detached from the shell, the shell recieves NO messages from it..
it's commonly used in webserver environments(as i'm using it for) and also is used during startup-scripts ofccasionally if the process is going to take along time to execute, yes the system must still continue to boot regardless.

thansk for the link, i don't knowwhy i didn't find it myself...

-=DD32=-
 
Old 07-15-2004, 07:37 AM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
bash supports forking internaly :

#!/bin/bash
updatedb &
echo "I actually display this message while updatedb is running "
 
Old 07-15-2004, 08:59 AM   #7
netmask
Member
 
Registered: Jul 2004
Location: Sherbrooke, Quebec, Canada, North America, World, Milky Way
Distribution: Gentoo
Posts: 103

Rep: Reputation: 16
If you use &, you DO get messages from the program (if it outputs any of course.. ).
 
Old 07-15-2004, 09:05 AM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
no, if you use the null device :
command 1> /dev/null 2> /dev/null &

Last edited by keefaz; 07-15-2004 at 09:08 AM.
 
Old 07-15-2004, 01:54 PM   #9
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Yes, you have a choice of the above or using fork, personally, fork is a little quicker to type in :)
 
Old 07-15-2004, 02:01 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Ok so :
Code:
#!/bin/bash
exec $1 1> /dev/null 2> /dev/null &
Save it at /usr/bin/fork and chmod +x it
 
Old 07-16-2004, 03:30 PM   #11
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Oh shush you :D - that's probably all fork is, a two line shell script :P!

To be honest, I just did add it to my /usr/bin,

cheers ;)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forking a Project posto Programming 3 08-29-2005 05:39 PM
piping /forking geminigal Programming 3 04-10-2005 09:49 PM
Forking is very slow jspenguin Linux - General 2 05-29-2004 02:03 PM
Forking in Unix Rv5 Linux - General 5 11-04-2003 03:27 PM
need help forking pings penguinboy Programming 2 09-12-2002 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration