tst-putenvmod.c 277 B

1234567891011121314151617
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <unistd.h>
  4. void
  5. __attribute ((constructor))
  6. init (void)
  7. {
  8. puts ("init DSO");
  9. static char str[] = "SOMETHING_NOBODY_USES=something_else";
  10. if (putenv (str) != 0)
  11. {
  12. puts ("putenv failed");
  13. _exit (1);
  14. }
  15. }