Commit Graph

10 Commits

Author SHA1 Message Date
Evgeny L
4064d6acc0 Flag to set working directory (#650)
* proc: Add `wd` to Launch

This change adds the `wd` arg which specify working directory of the
program.

Fixes #295

* service/debugger: Add `Wd` field to debugger.Config

This change adds the `Wd` field which specify working directory of the
program launched by debugger.

Fixes #295

* service: Add `Wd` to service.Config

This change adds the `Wd` field which specify working directory of the
program debugger will launch.

Fixes #295

* cmd/dlv: Add `Wd` flag

This change adds `Wd` flag which specify working directory of the
program which launched by debugger.

Fixes #295

* only set the Linux working directory if it is set,
stub out param in darwin and windows

* set working directory for Windows
https://godoc.org/golang.org/x/sys/windows#CreateProcess
https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx

* Windows workingDir must be an *uint16

* attempt to chdir on darwin via @yuntan

* proc/exec_darwin.c: fix working directory for darwin

* Add tests to check if working directory works.
* Fix darwin implementation of fork/exec, which paniced if
  child fork returned.

* cmd, service: rename Wd to WorkingDir
2016-11-01 12:58:42 -07:00
Derek Parker
f37a26d525 proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
Derek Parker
4fd02c829a proc: Set close-on-exec flag on fork pipes 2016-04-12 22:33:20 -07:00
aarzilli
2f9f20188a proc: bugfix: proc.Launch race (OS X) 2016-01-09 08:44:35 +01:00
Derek Parker
12bd0472d2 Only make new process a group leader, not session
We're not dealing with a debugged process having its own controlling
terminal at this point, so no need to make the new process a session
leader. Simply making the process a group leader will suffice for our
purposes at the moment.
2015-08-13 18:18:42 -05:00
Derek Parker
544c4ccc3d Add more documentation around darwin fork_exec 2015-07-28 12:23:36 -05:00
Derek Parker
a6fc8d11a7 Create new session/process grp for forked process 2015-07-28 12:20:07 -05:00
Derek Parker
776e2a593f Null terminate argv array in Go land not C land 2015-07-07 14:57:36 -05:00
Derek Parker
05517c62c1 Properly terminate C string array for execve on OSX 2015-07-07 08:42:34 -05:00
Derek Parker
bfca6114d4 Rename package proctl -> proc 2015-06-12 14:49:23 -05:00