Results 1 to 2 of 2

Thread: What's the significance of putting "start_services &" within a subshell?

  1. #1

    What's the significance of putting "start_services &" within a subshell?

    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)?

  2. #2
    Moderator Moderator
    Join Date
    Nov 2010
    Location
    Germany/ Dietzenbach
    Posts
    1,124
    It's the way to get the the function "start_services" running in the background → "&".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


SanDisk 1TB SSD Plus, Internal Solid State Drive - SDSSDA-1T00-G26 picture

SanDisk 1TB SSD Plus, Internal Solid State Drive - SDSSDA-1T00-G26

$74.99



Western Digital 1TB WD Blue PC Desktop 3.5'' Internal CMR Hard Drive - WD10EARZ picture

Western Digital 1TB WD Blue PC Desktop 3.5'' Internal CMR Hard Drive - WD10EARZ

$44.99



1TB Samsung 840 EVO Internal 2.5

1TB Samsung 840 EVO Internal 2.5" SATA III SSD MZ7TE1T0HMHP Solid State Drive

$78.91



Western Digital 1TB WD Gold Enterprise Class SATA Internal HDD - WD1005FBYZ picture

Western Digital 1TB WD Gold Enterprise Class SATA Internal HDD - WD1005FBYZ

$84.99



Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture

Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot

$23.99



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$14.99



Crucial - P3 Plus 1TB Internal SSD PCIe Gen 4 x4 NVMe picture

Crucial - P3 Plus 1TB Internal SSD PCIe Gen 4 x4 NVMe

$69.99



1TB HDD/SSD 2.5

1TB HDD/SSD 2.5" SATA Hard Drive for Laptop with Win 10/Win 11 Pro Pre-installed

$29.95



1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage US picture

1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage US

$26.29



Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot picture

Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot

$198.99