Skip to content
  • Pavel Emelyanov's avatar
    43f62f42
    rst: Close standard descriptors before fds restore · 43f62f42
    Pavel Emelyanov authored
    
    
    Strictly speaking we have to close all fds before reopening them from the
    image. This can be done using not yet merged nextfd syscall, but it's not
    yet merged :( By now just close std and 255 (bash's) descriptors. This is
    ugly, but I prefer to wait for the nextfd syscall.
    
    But skip the init tasks' stds becase the existing zdtm implementation
    uses system() in such tasks which doesn't work when all fds are closed.
    
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
    43f62f42
    rst: Close standard descriptors before fds restore
    Pavel Emelyanov authored
    
    
    Strictly speaking we have to close all fds before reopening them from the
    image. This can be done using not yet merged nextfd syscall, but it's not
    yet merged :( By now just close std and 255 (bash's) descriptors. This is
    ugly, but I prefer to wait for the nextfd syscall.
    
    But skip the init tasks' stds becase the existing zdtm implementation
    uses system() in such tasks which doesn't work when all fds are closed.
    
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
Loading