• Pavel Emelyanov's avatar
    files: Formalize fd restore priorities · 8fc6dbfa
    Pavel Emelyanov authored
    There are places when we have to select which fd to ->open
    and which to ->receive. To avoid deadlocks we sort them in
    an ascending order on { pid, fd } pair.
    
    Make this idea more formal by introducing an explicit function
    doing this check and call it where appropriate (pipe.c master
    selection is also simplified to fit new ... API).
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    8fc6dbfa
pipes.c 9.2 KB