method
spawn
v1_9_1_378 -
Show latest stable
-
0 notes -
Class: PTY
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (38)
- 1_9_3_392 (0)
- 2_1_10 (-9)
- 2_2_9 (0)
- 2_4_6 (-1)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
spawn(*args)
public
spawns the specified command on a newly allocated pty.
The command’s controlling tty is set to the slave device of the pty. Also its standard input/output/error is redirected to the slave device.
PTY.spawn returns two IO objects and PID. PID is the process ID of the command. The two IO objects are connected to the master device of the pty. The first IO object is opened as read mode and The second is opened as write mode.
If a block is given, two IO objects and PID is yielded.