PasteRack.org
Paste # 10265
2024-11-01 22:33:54

Fork as a new paste.

Paste viewed 179 times.


Embed:

qed

  1. #lang racket
  2.  
  3. (require racket/system)
  4.  
  5. (define (main)
  6.   (define cmd "/bin/bash -c \"/bin/ls .\"")
  7.   (define result (system cmd))
  8.   (unless (zero? result)
  9.     (displayln (format "Command exited with error code: ~a" result))))
  10.  
  11. (main)

=>

subprocess: `execute' access denied for /bin/sh