difference between systemd & init?
Before writing to the port i m setting the value of Control register by setting the its 5th bit at LOGIC 1. and after performing write operation i am checking the status of control register… I am surprised as the status of Control register is always incrementing as I incrementing the value from user side(eg. A, B, C…etc) …..
?????????????
Why this shows error in this question?But it shows the result.
1 #include<stdio.h>
2 struct student
3 {
4 int id;
5 char *name;
6 float percentage;
7 }student1,student2,student3;
8
9 int main()
10 {
11 struct student st;
12 student1.id=1;
13 student2.name=”Angelina”;
14 student3.percentage=90.5;
15 printf(“Id is :%d \n”,student1.id);
16 printf(“Name is :%s \n”,student2.name);
17 printf(“Percentage is :%f\n”,student3.percentage);
18 getc();
19 return 0;
20 }
assstr1.c:20:2: error: too few arguments to function ‘_IO_getc’
/usr/include/libio.h:462:12: note: declared here
make: *** [assstr1] Error 1
what are the two types of files used by the shells to initialise itself???
Here is the code snippet of a prog
************** START **********************
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
int glob_var = 100;
int main(void)
{
int var;
pid_t pid;
var = 200;
printf(“++Before Fork()\n”);
if((pid = fork()) < 0) {
perror(“fork error”);
} else if (pid == 0) {
glob_var++;
var++;
printf(“Within Child = > pid: %d <> Parent pid => %d\n”, getpid(), getppid());
} else {
var–;
glob_var–;
}
printf(“pid = %d, glob_var = %d, var = %d\n”,getpid(), glob_var, var);
exit(0);
}
************** END *******************
and here is the output
******************** OUTPUT START ****************
sudipto$ gcc -Wall -g fork01.c -o fork01
sudipto$ ./fork01
++Before Fork()
pid = 4718, glob_var = 99, var = 199
Within Child = > pid: 4719 <> Parent pid => 4718
pid = 4719, glob_var = 101, var = 201
sudipto$ ./fork01 > temp.out
sudipto$ cat temp.out
++Before Fork()
pid = 4720, glob_var = 99, var = 199
++Before Fork()
Within Child = > pid: 4721 <> Parent pid => 4720
pid = 4721, glob_var = 101, var = 201
sudipto$
******************** OUTPUT END ************************
Question: Why is “++Before Fork()” being printed twice when I read from file? Am i missing something here. Thanks!
Can any one help in solving this confusion between dynamic loading and dynamic linking. These terms are purely related with .so files I think but I am not getting the exact difference. Any guidance…??
Thank you
Implementation of pointers done today.Examples using pointers were applied and compiled.
LED’s are glowing in proper manner.
Assignment 1 and 2 complete.
LED’s Are glowing properly with the user pattern…….
Signal Number Default Action Remarks
SIGWAITING 32 Ignore Cocurrancy signal used by threads library
SIGLWP 33 Ignore Inter LWP signal used by thread library
Where LWP: light weight process
For further information you can access man pages by giving the command
man 7 signal
gdeveng sir…implemented fork(),simultaneous fork and wait…right nw working on multiple fork.
Messege from vishnu: Led’s are glowing and assignment 1 & 2 completed.
LED’s are glowing in right way as the data on the data lines.
Successfully Implemented the Compatibility mode(IEEE 1284-1994) On LED 8 array.