Anonymous user
Run as a daemon or service: Difference between revisions
→{{header|Smalltalk}}
Line 323:
=={{header|Smalltalk}}==
{{works with |Smalltalk/X}}
<lang smalltalk>
(pid := OperatingSystem fork) == 0 ifTrue:[
Stdin close.
Stdout := '/tmp/daemon.log' asFilename writeStream.
Line 339 ⟶ 340:
]</lang>
{{out}}
<pre>bash-3.2$ ./daemon.st
bash-3.2$
... after a few seconds:
bash-3.2$ cat /tmp/daemon.log
here is the child
another hello on Transcript 1
|