#EC451L
البرنامج الثاني
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int spawn (char* program, char** arg_list)
{
pid_t child_pid;
child_pid = fork();
if(child_pid !=0)
return child_pid;
else {
execvp (program, arg_list);
fprintf (stderr, "an error occurred in execvp\n");
abort();
}
}
int main ()
{
char* arg_list [] = {
"ls",
"-l",
"/",
NULL
};
spawn ("ls", arg_list);
printf("done with main program");
return 0; }
البرنامج الثاني
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int spawn (char* program, char** arg_list)
{
pid_t child_pid;
child_pid = fork();
if(child_pid !=0)
return child_pid;
else {
execvp (program, arg_list);
fprintf (stderr, "an error occurred in execvp\n");
abort();
}
}
int main ()
{
char* arg_list [] = {
"ls",
"-l",
"/",
NULL
};
spawn ("ls", arg_list);
printf("done with main program");
return 0; }
❤5
#EC451L
البرنامج الأول
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
pid_t child_pid;
printf("the program process ID is %d\n", (int) getpid());
child_pid = fork();
if(child_pid !=0){
printf("this is the parent process, with id %d\n", (int) getpid());
printf("the child's process id is %d\n", (int) child_pid);
}
else
printf(" this is the child process, with id %d\n", (int) getpid());
return 0; }
البرنامج الأول
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
pid_t child_pid;
printf("the program process ID is %d\n", (int) getpid());
child_pid = fork();
if(child_pid !=0){
printf("this is the parent process, with id %d\n", (int) getpid());
printf("the child's process id is %d\n", (int) child_pid);
}
else
printf(" this is the child process, with id %d\n", (int) getpid());
return 0; }
❤6
#EC202
السلام عليكم ورحمة الله
تقسيم درجات المادة تو كيف قال عليها الدكتور في التيتوريل
15 نصفي اول
15 نصفي تاني
10 واجب
10 حضور
50 فاينل
وقال بنبدا ناخد حضور فالتيتوريل
السلام عليكم ورحمة الله
تقسيم درجات المادة تو كيف قال عليها الدكتور في التيتوريل
15 نصفي اول
15 نصفي تاني
10 واجب
10 حضور
50 فاينل
وقال بنبدا ناخد حضور فالتيتوريل
🤯3😁2🕊2
السلام عليكم ورحمة الله وبركاته من الproplem 5-1 الي 8-5 #EC202 homework التسليم التلاتاء القادم 2024/7/30
🤯2❤1🫡1
Problem set 4S.pdf
22.1 MB
❤8🤯3🕊1
❤5⚡1
❤8