19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/vte4/terminal.rb', line 19
def spawn(options={})
pty_flags = options[:pty_flags] || PtyFlags::DEFAULT
working_directory = options[:working_directory]
argv = options[:argv] || [ENV["SHELL"] || "/bin/sh"]
envv = options[:envv]
default_spawn_flags = GLib::Spawn::SEARCH_PATH
spawn_flags = options[:spawn_flags] || default_spawn_flags
succeeded, pid = spawn_sync(pty_flags,
working_directory,
argv,
envv,
spawn_flags)
if succeeded
pid
else
nil
end
end
|