PDA

View Full Version : What's the significance of putting "start_services &" within a subshell?



winger9
09-04-2015, 08:23 PM
Hi

I'm looking at the following command in the /etc/init.d/knoppix-autoconfig boot script:

( start_services & ) >/dev/tty"$LOG_CONSOLE" 2>&1 # Not in job list

It is in the context of

# Start services (especially /etc/rc.local) in background
addtask "bg"; addprogress "Starting background services..."
( start_services & ) >/dev/tty"$LOG_CONSOLE" 2>&1 # Not in job list

The "start_services" is a function within the "knoppix-autoconfig" script.

Could you tell me what the significance is of putting the "start_services &"
WITHIN A SUBSHELL (the (...) brackets)?

Werner P. Schulz
09-06-2015, 09:52 PM
It's the way to get the the function "start_services" running in the background → "&".