Skip to content

Commit cf63b30

Browse files
committed
close instead of dev/null
1 parent d3f0d13 commit cf63b30

File tree

1 file changed

+3
-3
lines changed
  • examples/bg-task/pages

1 file changed

+3
-3
lines changed

examples/bg-task/pages/bg.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ event_stream() {
1212
# and pipe its output to the SSE topic 'stuff'
1313
#
1414
# important things to note:
15-
# 1. we close stdin at the start with '</dev/null'
15+
# 1. we close stdin at the start with '0>&-'
1616
# 2. we close stdout and stderr at the end of the pipe
1717

18-
</dev/null ./task.sh \
18+
0>&- ./task.sh \
1919
| event_stream update \
20-
| publish stuff &>/dev/null &
20+
| publish stuff 1>&- 2>&- &
2121

2222
# this happens immediately; we don't need to wait
2323
# for the above task to finish to get this response.

0 commit comments

Comments
 (0)