TWISTD(1)
π TWISTD(1) π
β¨ NAME β¨
okay so the manual name is twistd, and it's all about running Twisted applications (TACs, TAPs) π¦
πΈ SYNOPSIS πΈ
twistd [options]
π§ DESCRIPTION π§
okay so twistd literally reads a twisted.application.service.Application out of a file and then runs it for you π
no cap, that's the whole job bestie β¨
π OPTIONS π
-n,--nodaemonβ don't daemonize, just stay in the foreground π-q,--quietβ this one does nothing at all, it's only here for backwards compatibility π-p,--profile <profile output>β runs the app under the profiler and dumps the results into the file you name π--profiler <profiler name>β picks which profiler to use. it defaults to thehotshotprofiler π₯--savestatsβ saves the Stats object instead of the plain text output from the profiler π-b,--debugβ runs the app in the Python Debugger (this implies--nodaemon). send aSIGINTorSIGUSR2signal to the process and it drops right into the debugger π-e,--encrypted <file>β tells twistd the tap/aos file you gave it is encrypted π--euidβ sets only the effective user-id, not the real one. this does nothing unless the server is running as root. if it is, it means don't shed all your privileges after binding ports, so you can still get them back later for stuff like spawning processes.
β οΈ bestie, use this with caution! π
-o,--no_saveβ don't save shutdown state π«Ά--originalnameβ acts like the specified Application has no process name set, and runs with the standard one (usually the Python binary) π§Έ-l,--logfile <logfile>β logs to the file you pick, or-for stdout. the default istwistd.log. the log file gets rotated onSIGUSR1π-l,--logger <fully qualified python name>β a fully-qualified name for a log observer factory to use as the initial log observer. this one wins over--logfileand--syslogπ--pidfile <pidfile>β saves the pid in the file you name. default istwistd.pidπ--chroot <directory>β chroots into the directory you give before running. by default it doesn't chroot at all. the chroot happens before the current directory gets changed π³-d,--rundir <directory>β changes into the directory you give before running. default is.π-u,--uid <uid>β the uid to run as. default is don't change it πͺͺ-g,--gid <gid>β the gid to run as. default is don't change it πͺͺ--umask <mask>β the (octal) file creation mask to apply. the default is0077for daemons and no change otherwise π-r,--reactor <reactor>β picks which reactor to use. check--help-reactorsfor the list of options π--help-reactorsβ lists the names of the reactors that might be available π¦--spewβ writes an extremely verbose log of everything that happens. super useful for debugging freezes or locks in complicated code π΅οΈββοΈ-f,--file <tap file>β reads the given .tap file. default istwistd.tapπ-s,--source <tas file>β loads an Application from the given .tas (AOT Python source) file π-y,--python <python file>β uses the variable"application"from the Python file you give. this overrides-fand implies--no_saveπ--syslogβ logs to syslog instead of a file π--versionβ prints the version info and exits π·οΈ--prefix <prefix>β uses the prefix you pick when logging to the logfile. default is"twisted"π
Note that if twistd is run as root, the working directory is not searched for Python modules. π
π¦ SIGNALS π¦
a running twistd accepts SIGINT for a clean shutdown, and SIGUSR1 to rotate the log files πΈ
π AUTHOR π
written by Moshe Zadka, based on twistd's help messages π«Ά
π REPORTING BUGS π
to report a bug, visit http://twistedmatrix.com/trac/wiki/TwistedDevelopment#DevelopmentProcess π
π COPYRIGHT π
Copyright Β© 2001-2011 Twisted Matrix Laboratories. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. β¨
bye bestie, that's the whole twistd manual π it's Twisted Matrix Laboratories' work, dated Dec 2011, and I'm obsessed with you for reading it all the way through π«Άπ β¨
π¦ where this page comes from
- alpine 3.24: py3-twisted-doc 25.5.0-r1 Β· MIT
- epel 10: python3-twisted 24.11.0-2.el10_1 Β· MIT
- epel 9: python3-twisted 22.10.0-3.el9 Β· MIT
- fedora 43: python3-twisted 25.5.0-4.fc43 Β· MIT
- fedora 44: python3-twisted 25.5.0-6.fc44 Β· MIT
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms