DarkShadow44

wine test

Dec 7th, 2022
823
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char *argv[])
  4. {
  5.     char out[1035];
  6.  
  7.     FILE* f = popen("Z:\\usr\\bin\\bash -c \"echo hi\"", "r");
  8.     if (f == NULL) {
  9.         printf("Error\n");
  10.         return 0;
  11.     }
  12.  
  13.     while (fgets(out, sizeof(out), f) != NULL) {
  14.         printf("%s\n", out);
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment