Path: utzoo!attcan!uunet!husc6!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: pointers, tests, casts Message-ID: <4860@bsu-cs.UUCP> Date: 25 Nov 88 15:10:35 GMT References: <11130@dartvax.Dartmouth.EDU> <8961@smoke.BRL.MIL> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 17 In article <8961@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: > execl( "/bin/sh", "-sh", "-i", 0 ); >...The bug typified by this is seen in a >LOT of code ("well it worked on MY machine!"). Sadly, the only UNIX programming textbook I've seen on the market, by Rochkind, consistently uses 0 and NULL as actual parameters without any cast. This may be because Rochkind did all his programming using Venix on an IBM XT, and the Venix compiler does not support any memory model in which ints and char pointers are of different sizes. There is probably an entire generation of future programmers ready to graduate and begin planting execl(...., 0) timebombs in production code. -- Rahul Dhesi UUCP: !{iuvax,pur-ee}!bsu-cs!dhesi