blackhole.utils

A utility module used for methods and features that do not belong in their own module.

blackhole.utils

blackhole.utils.setgid()[source]

Change our existing group.

Used to drop from root privileges down to a less privileged group.

MUST be called BEFORE setuid, not after.

blackhole.utils.setuid()[source]

Change our existing user.

Used to drop from root privileges down to a less privileged user

MUST be called AFTER setgid, not before.

blackhole.utils.terminate(signum, frame)[source]

Terminate the parent process and send signals to shut down it’s children

Iterates over the child pids in the frame and sends the SIGTERM signal to shut them down.

blackhole.utils.set_process_title()[source]

Set the title of the process.

If the process is the master, set a master title, otherwise set worker.

blackhole.utils.email_id()[source]

Generate an HEX ID to assign to each connection.

Will be reused later down the line due to the limited number of characters.

Table Of Contents

Previous topic

blackhole.state

This Page