Dylan B. answered 11/10/20
Computer science Tutor, Associates degree, Real world experience
The simplest is to parse the output of commands using popen.
The following:
will output on my system:
Umair K.
asked 06/29/20Hi, how do i find the number of total threads and processes in this C program?
Thanks
#include <stdio.h>
#include <unistd.h>
#include <pathread.h>
Int main()
{ int I;
For(i=0; i<5; i++)
{fork()
Thread_create(&tid, NULL, hello, NULL); }
Return 0; }
Int hello()
{ void * x }
Dylan B. answered 11/10/20
Computer science Tutor, Associates degree, Real world experience
The simplest is to parse the output of commands using popen.
The following:
will output on my system:
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.