Pollux's corner
  • Blog
  • BSD
  • Databases
  • Debian
  • General
  • Programming
  • Security

[archives] [tags]

links

  • To Linux and Beyond
  • n0secure
  • Dindinx
  • A Few Thoughts on Cryptographic Engineering
  • Planet Debian
  • Planet Clang
  • Planet PostgreSQL

Social

  • @pollux7
  • github
  • debian

Tags

  • Compiler
  • Security
  • Netfilter
  • Programming
  • Firewall
  • Debian
  • Ulogd
  • OCaml
  • Work
  • LLVM
  • [all tags]

Pollux's corner Shell

bash hates twisted (me too, sometimes)

Date Wed 13 February 2008 Tags Programming Shell

I have a strange bug with bash shebang: when I try to give twistd as interpreter, bash tries to execute the script as a shell script !

Here is a simple, not working, twisted script with a shebang:

1
2
#! /usr/bin/twistd -y
from twisted.application import internet, service

Bash execution:

$ bash -c ./test.tac
from: can't read /var/mail/twisted.application

Bash is trying to execute the script as a shell script ! (from is a shell command).

Zsh execution:

$ zsh -c ./test.tac
Failed to load application: 'application'

The error is correct (there is no application defined in the twisted script). It really looks like a bug in bash ..

Page 1 / 1