diff --git a/collects/mzlib/process.rkt b/collects/mzlib/process.rkt index c527604bae..2374e82bec 100644 --- a/collects/mzlib/process.rkt +++ b/collects/mzlib/process.rkt @@ -6,7 +6,10 @@ system system* system/exit-code - system*/exit-code) + system*/exit-code + + string-no-nuls? + bytes-no-nuls?) (require "private/streams.rkt") @@ -82,9 +85,6 @@ s)))]) args) -;; MF: fxing a somewhat awkward looking error message. Comment for Matthew in case he wants to improve on it. -(provide string-no-nuls? bytes-no-nuls?) - (define (check-command who str) (unless (or (string-no-nuls? str) (bytes-no-nuls? str)) diff --git a/collects/scribblings/reference/subprocess.scrbl b/collects/scribblings/reference/subprocess.scrbl index 1154f6c8b9..6f06dd399c 100644 --- a/collects/scribblings/reference/subprocess.scrbl +++ b/collects/scribblings/reference/subprocess.scrbl @@ -482,3 +482,17 @@ returned list is @racket[#f].} Like @racket[process*], but with the port handling of @racket[process/ports].} +@; ---------------------------------------------------------------------- + +@;section{Contract Auxiliaries} + +@;note-lib[racket/system] + +The contracts of @racket[system] and related functions may signal a +contract error with references to the following functions. + +@defproc[(string-no-nuls? [x any/c]) boolean?]{ +Ensures that @racket[x] is a string and does not contain @racket["\0"].} + +@defproc[(bytes-no-nuls? [x any/c]) boolean?]{ +Ensures that @racket[x] is a byte-string and does not contain @racket["\0"].} diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index c6e1679fbd..d772e83cd5 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -77,6 +77,7 @@ racket/sandbox: added sandbox-propagate-exceptions; added racket/cmdline: add #:ps for command-line slideshow/start: run a `slideshow' or `main' submodule, if any scribble/eval: added eval:result and eval:results +racket/system: improved error messages by replacing memv expressions with string-no-nuls? and bytes-no-nuls? Version 5.2.1, January 2012 Changed I/O scheduling to use epoll()/kqueue() when available