Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 228

Check value of system function

$
0
0

I want to find the return value of the mount command which is passed into the system function using the C language. How can I do this?

For example:

printf("return val = %d",WEXITSTATUS(system(mount /dev/sda /media/mmcblk0)));

But every time it gives me 255 as the value.

How can I find return code fired by my mount commandor any other solution?

NOTE: I have included header files properly


Viewing all articles
Browse latest Browse all 228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>