Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(467)

Delta Between Two Patch Sets: src/pkg/os/executable_procfs.go

Issue 6736069: code review 6736069: runtime, syscall, os: add os.ExecPath() (string, error)
Left Patch Set: diff -r 88c4bdf6cfb8 https://code.google.com/p/go/ Created 11 years, 5 months ago
Right Patch Set: diff -r 617db9efbdf1 https://code.google.com/p/go/ Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/os/executable_plan9.go ('k') | src/pkg/os/executable_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build linux netbsd openbsd
6
7 package os
8
9 import (
10 "errors"
11 "runtime"
12 )
13
14 func executable() (string, error) {
15 switch runtime.GOOS {
16 case "linux":
17 return "/proc/self/exe", nil
18 case "netbsd":
19 return "/proc/curproc/exe", nil
20 case "openbsd":
21 return "/proc/curproc/file", nil
22 }
23 return "", errors.New("Executable not implemented for " + runtime.GOOS)
24 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b