LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Fork, exec, wait, etc. | 5 // Fork, exec, wait, etc. |
6 | 6 |
7 package syscall | 7 package syscall |
8 | 8 |
9 import ( | 9 import ( |
10 "sync" | 10 "sync" |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 | 509 |
510 _, e = Write(fd, []byte(v[i+1:])) | 510 _, e = Write(fd, []byte(v[i+1:])) |
511 if e != nil { | 511 if e != nil { |
512 Close(fd) | 512 Close(fd) |
513 return e | 513 return e |
514 } | 514 } |
515 Close(fd) | 515 Close(fd) |
516 } | 516 } |
517 } | 517 } |
518 | 518 |
519 » _, _, e := Syscall(SYS_EXEC, | 519 » _, _, e1 := Syscall(SYS_EXEC, |
520 uintptr(unsafe.Pointer(StringBytePtr(argv0))), | 520 uintptr(unsafe.Pointer(StringBytePtr(argv0))), |
521 uintptr(unsafe.Pointer(&StringSlicePtr(argv)[0])), | 521 uintptr(unsafe.Pointer(&StringSlicePtr(argv)[0])), |
522 0) | 522 0) |
523 | 523 |
524 » return NewError(e) | 524 » return e1 |
525 } | 525 } |
LEFT | RIGHT |