cregit-Linux how code gets into the kernel

Release 4.16 samples/watchdog/watchdog-simple.c

Directory: samples/watchdog
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>


int main(void) { int fd = open("/dev/watchdog", O_WRONLY); int ret = 0; if (fd == -1) { perror("watchdog"); exit(EXIT_FAILURE); } while (1) { ret = write(fd, "\0", 1); if (ret != 1) { ret = -1; break; } sleep(10); } close(fd); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Randy Dunlap5463.53%150.00%
Américo Wang3136.47%150.00%
Total85100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Randy Dunlap6061.22%125.00%
Américo Wang3131.63%125.00%
Jean Delvare66.12%125.00%
Greg Kroah-Hartman11.02%125.00%
Total98100.00%4100.00%
Directory: samples/watchdog
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.