diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-01 23:21:55 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-02 00:13:47 +0000 |
| commit | 5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch) | |
| tree | 00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/syscall/exec_plan9.go | |
| parent | 8b4deb448e587802f67930b765c9598fc8cd36e5 (diff) | |
| download | go-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.xz | |
all: single space after period.
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.
This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:
$ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])')
$ go test go/doc -update
Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_plan9.go')
| -rw-r--r-- | src/syscall/exec_plan9.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/syscall/exec_plan9.go b/src/syscall/exec_plan9.go index d342cb02bc..b9e78c5ab4 100644 --- a/src/syscall/exec_plan9.go +++ b/src/syscall/exec_plan9.go @@ -15,31 +15,31 @@ import ( // Lock synchronizing creation of new file descriptors with fork. // // We want the child in a fork/exec sequence to inherit only the -// file descriptors we intend. To do that, we mark all file +// file descriptors we intend. To do that, we mark all file // descriptors close-on-exec and then, in the child, explicitly // unmark the ones we want the exec'ed program to keep. // Unix doesn't make this easy: there is, in general, no way to -// allocate a new file descriptor close-on-exec. Instead you +// allocate a new file descriptor close-on-exec. Instead you // have to allocate the descriptor and then mark it close-on-exec. // If a fork happens between those two events, the child's exec // will inherit an unwanted file descriptor. // // This lock solves that race: the create new fd/mark close-on-exec // operation is done holding ForkLock for reading, and the fork itself -// is done holding ForkLock for writing. At least, that's the idea. +// is done holding ForkLock for writing. At least, that's the idea. // There are some complications. // // Some system calls that create new file descriptors can block // for arbitrarily long times: open on a hung NFS server or named -// pipe, accept on a socket, and so on. We can't reasonably grab +// pipe, accept on a socket, and so on. We can't reasonably grab // the lock across those operations. // // It is worse to inherit some file descriptors than others. // If a non-malicious child accidentally inherits an open ordinary file, -// that's not a big deal. On the other hand, if a long-lived child +// that's not a big deal. On the other hand, if a long-lived child // accidentally inherits the write end of a pipe, then the reader // of that pipe will not see EOF until that child exits, potentially -// causing the parent program to hang. This is a common problem +// causing the parent program to hang. This is a common problem // in threaded C programs that use popen. // // Luckily, the file descriptors that are most important not to @@ -49,13 +49,13 @@ import ( // The rules for which file descriptor-creating operations use the // ForkLock are as follows: // -// 1) Pipe. Does not block. Use the ForkLock. -// 2) Socket. Does not block. Use the ForkLock. -// 3) Accept. If using non-blocking mode, use the ForkLock. +// 1) Pipe. Does not block. Use the ForkLock. +// 2) Socket. Does not block. Use the ForkLock. +// 3) Accept. If using non-blocking mode, use the ForkLock. // Otherwise, live with the race. -// 4) Open. Can block. Use O_CLOEXEC if available (Linux). +// 4) Open. Can block. Use O_CLOEXEC if available (Linux). // Otherwise, live with the race. -// 5) Dup. Does not block. Use the ForkLock. +// 5) Dup. Does not block. Use the ForkLock. // On Linux, could use fcntl F_DUPFD_CLOEXEC // instead of the ForkLock, but only for dup(fd, -1). @@ -169,7 +169,7 @@ func init() { // (The pipe write end is close-on-exec so if exec succeeds, it will be closed.) // // In the child, this function must not acquire any locks, because -// they might have been locked at the time of the fork. This means +// they might have been locked at the time of the fork. This means // no rescheduling, no malloc calls, and no new stack segments. // The calls to RawSyscall are okay because they are assembly // functions that do not grow the stack. |
