| Summary: | sleep command after '&' in a shell script has no effect | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Manhong <manhongdai> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | blocker | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Manhong
2023-06-17 21:04:58 UTC
A workaround is to add a pair of parenthesis to the command that need to be in the background. #!/bin/sh for i in 0 1 2 3 4 5 do ( echo "Loop: $i" & ) sleep 10 done This is the same bug as reported in https://bugs.busybox.net/show_bug.cgi?id=15619 |