* archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
[oweals/busybox.git] / coreutils / env.c
index aca7c3ae2f4f0ddb28153fcf8c9714da8bd5c9d0..8bb690b72e5134554e81e6d06e65b222965339ab 100644 (file)
@@ -59,13 +59,14 @@ extern int env_main(int argc, char** argv)
                cleanenv[0] = NULL;
        }
        for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv)
-               putenv(*argv);
+               if (putenv(*argv) < 0)
+                       perror_msg_and_die("%s", *argv);
        if (*argv) {
                execvp(*argv, argv);
                perror_msg_and_die("%s", *argv);
        }
        for (ep = environ; *ep; ep++)
-               printf("%s\n", *ep);
+               puts(*ep);
        return 0;
 }