ฉันจะเรียกใช้วนรอบไม่สิ้นสุดในพื้นหลังในขณะที่ดำเนินการสคริปต์ต่อไปได้อย่างไร
ตัวอย่าง "script":
while true; do something_in_the_background; done
do_something_while_the_loop_goes_on_in_the_background
for 1 2 3; do somethingelse; done
exit 0
สิ่งนี้ (สังเกตเห็น&) ดูเหมือนว่าจะผิดพลาดทั้งระบบหลังจากนั้นครู่หนึ่ง:
while true; do
something_in_the_background &
done
do_something_while_the_loop_goes_on_in_the_background
for 1 2 3; do somethingelse; done
exit 0
ไม่แปลกใจเลยที่คุณกำลังสร้างกระบวนการมากมาย
—
Ed Heal
ถามทิศทางสำหรับการวางระเบิดหรือไม่?
—
Baazigar
คุณช่วยบอกความตั้งใจในการใช้วงวนไม่สิ้นสุดในเบื้องหลังได้ไหม?
—
เซลล์ประสาท