Date: Wed, 26 Jun 2013 17:11:14 GMT From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r253548 - in soc2013/dpl/head: contrib/bzip2 usr.bin/bzip2 Message-ID: <201306261711.r5QHBENP049876@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dpl Date: Wed Jun 26 17:11:14 2013 New Revision: 253548 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253548 Log: Style nuances. Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c soc2013/dpl/head/usr.bin/bzip2/Makefile Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c ============================================================================== --- soc2013/dpl/head/contrib/bzip2/bzip2.c Wed Jun 26 16:51:45 2013 (r253547) +++ soc2013/dpl/head/contrib/bzip2/bzip2.c Wed Jun 26 17:11:14 2013 (r253548) @@ -250,6 +250,7 @@ cmsg->cmsg_type = SCM_RIGHTS; memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); + printf("sendfd fd: %d\n", fd); if((sendmsg(s, &msg, 0)) != (int)iov.iov_len) return -1; return 0; @@ -279,6 +280,7 @@ return -1; cmsg = CMSG_FIRSTHDR(&msg); memcpy(&fd, CMSG_DATA(cmsg), sizeof(int)); + printf("recvfd fd: %d\n", fd); return fd; } #endif @@ -1396,21 +1398,20 @@ case ( 0 ): printf("Child\n"); if ((infd = recvfd(sv[1])) <= 0){ - fprintf ( stderr, "%s: Couldn't get fd infd: %s.\n", + fprintf ( stderr, "%s: Couldn't get infd: %s.\n", progName, strerror(errno) ); setExit(1); exit(exitValue); } - printf("inStr fd received: %d\n",infd); - inStr = fdopen(infd, "rb"); if ((outfd = recvfd(sv[1])) <= 0){ - fprintf ( stderr, "%s: Couldn't get fd outfd: %s.\n", + fprintf ( stderr, "%s: Couldn't get outfd: %s.\n", progName, strerror(errno) ); setExit(1); exit(exitValue); } - printf("outStr fd received: %d\n",outfd); + printf("Child: infd:%d, outfd:%d\n", infd, outfd); + inStr = fdopen(infd, "rb"); outStr = fdopen(outfd, "wb"); if (cap_enter() < 0) { @@ -1438,26 +1439,25 @@ } deleteOutputOnInterrupt = False; - exit(0); - # if CAPSICUM + exit(0); break; default: - printf("infd:%d, outfd:%d\n", infd, outfd); + printf("Parent: infd:%d, outfd:%d\n", infd, outfd); if (sendfd(sv[0], infd) < 0){ - fprintf ( stderr, "%s: Couldn't send fd infd: %s.\n", + fprintf ( stderr, "%s: Couldn't send infd: %s.\n", progName, strerror(errno) ); setExit(1); exit(exitValue); } if (sendfd(sv[0], outfd) < 0){ - fprintf ( stderr, "%s: Couldn't send fd outfd: %s.\n", + fprintf ( stderr, "%s: Couldn't send outfd: %s.\n", progName, strerror(errno) ); setExit(1); exit(exitValue); } - wait(0); + wait(NULL); return; } # endif Modified: soc2013/dpl/head/usr.bin/bzip2/Makefile ============================================================================== --- soc2013/dpl/head/usr.bin/bzip2/Makefile Wed Jun 26 16:51:45 2013 (r253547) +++ soc2013/dpl/head/usr.bin/bzip2/Makefile Wed Jun 26 17:11:14 2013 (r253548) @@ -27,11 +27,11 @@ .for f in ${REFFILES} ${f}: ${f}.gz.uu - uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f} + @uudecode -p ${BZ2DIR}/${f}.gz.uu | gunzip > ${f} .endfor .for f in ${DREFFILES} ${f}: ${f}.uu - uudecode ${BZ2DIR}/${f}.uu + @uudecode ${BZ2DIR}/${f}.uu .endfor test: bzip2 ${TESTFILES}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306261711.r5QHBENP049876>