def monitor_stdin():
    """Trigger shutdown when the parent process closes this process's stdin.
    This will occur if the :class:`fiftyone.core.service.DatabaseService`
    singleton destroyed.

    This should only occur when the parent process has exited.
    """
    while len(sys.stdin.read(1024)):
        pass
    if args.multi:
        client_monitor.notify_parent_exit()
    else:
        trigger_exit(ExitMode.PARENT)
Trigger shutdown when the parent process closes this process's stdin.
    This will occur if the :class:`fiftyone.core.service.DatabaseService`
    singleton destroyed.

    This should only occur when the parent process has exited.
    
fiftyone/service/main.py