// Even though plan9 doesn't support the Lock/RLock/Unlock functions to // manipulate already-open files, IsLocked is still meaningful: os.OpenFile // itself may return errors that indicate that a file with the ModeExclusive bit // set is already open. private static bool isLocked(error err) { var s = err.Error(); foreach (var(_, frag) in lockedErrStrings) { if (strings.Contains(s, frag)) { return(true); } } return(false); }
public string Error() { return(err.Error()); }
private static ptr <PtyError> ptyError(@string name, error err) { return(addr(new PtyError(name, err.Error(), err.(syscall.Errno)))); }