Bug 1330663

Summary: Add some error codes to clone manpage
Product: [Fedora] Fedora Reporter: Ben Woodard <woodard>
Component: man-pagesAssignee: Nikola Forró <nforro>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: jchaloup, nforro, qe-baseos-apps, tgummels
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: man-pages-4.05-2.fc25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1330661 Environment:
Last Closed: 2016-05-10 13:07:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1330661    
Bug Blocks:    

Description Ben Woodard 2016-04-26 16:50:07 UTC
+++ This bug was initially created as a clone of Bug #1330661 +++

Description of problem:
the clone syscall can return with some error codes that are not documented in the man page. In particular:

  ERESTARTSYS = 512 (To be restarted if SA_RESTART is set)
    Most common type of signal-interrupted syscall exit code.  The
    system call will be restarted with the same arguments if
    SA_RESTART is set; otherwise, it will fail with EINTR.

  ERESTARTNOINTR = 513 (To be restarted)
    Rare. For example, fork() returns this if interrupted.
    SA_RESTART is ignored (assumed set): the restart is
    unconditional.

  ERESTARTNOHAND = 514  (To be restarted if no handler)
    pause(), rt_sigsuspend() etc use this code.  SA_RESTART is
    ignored (assumed not set): syscall won't restart (will return
    EINTR instead) even after signal with SA_RESTART set. However,
    after SIG_IGN or SIG_DFL signal it will restart (thus the name
    "restart only if has no handler").

  ERESTART_RESTARTBLOCK = 516 (Interrupted by signal)
    Syscalls like nanosleep(), poll() which can't be restarted with
    their original arguments use this code. Kernel will execute
    restart_syscall() instead, which changes arguments before
    restarting syscall.  SA_RESTART is ignored (assumed not set)
    similarly to ERESTARTNOHAND. (Kernel can't honor SA_RESTART
    since restart data is saved in "restart block" in task struct,
    and if signal handler uses a syscall which in turn saves
    another such restart block, old data is lost and restart
    becomes impossible)


Version-Release number of selected component (if applicable):
This is true for all man pages right up until the latest version in Fedora.

Comment 1 Nikola Forró 2016-05-10 09:11:55 UTC
Upstream patch:
http://www.spinics.net/lists/linux-man/msg10249.html