def parent_is_inet():
result = False<EOL>sock = socket.fromfd(<EOL>sys.__stdin__.fileno(),<EOL>socket.AF_INET,<EOL>socket.SOCK_RAW)<EOL>try:<EOL><INDENT>sock.getsockopt(socket.SOL_SOCKET, socket.SO_TYPE)<EOL>result = True<EOL><DEDENT>except (OSError, socket.error) as err:<EOL><INDENT>if not err.args[<NUM_LIT:0>] == errno.ENOTSOCK:<EOL><INDENT>result = True<EOL><DEDENT><DEDENT>return result<EOL>
Check if parent is inet

    Check if our parent seems ot be a superserver, aka inetd/xinetd.

    This is done by checking if sys.__stdin__ is a network socket.

    :return: bool