-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.h
More file actions
29 lines (24 loc) · 715 Bytes
/
Copy pathuser.h
File metadata and controls
29 lines (24 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef USER_H
#define USER_H
#include "common.h"
/**
* User information collection and storage function
*
* Collects information about current user sessions and sends it through pipes.
* This function is called by child processes to monitor session status.
*
* @param userFD Pipe file descriptor for user information
* @param ucountFD Pipe file descriptor for user count
*/
void storeUserInfo(int userFD[2], int ucountFD[2]);
/**
* Current user count function
*
* Calculates and returns the number of currently active user sessions.
*
* @return Number of active user sessions
*/
int getUserCount(void);
// User information output function
void printUserInfo(int userFD[2]);
#endif // USER_H