1570af302Sopenharmony_ci#include <errno.h> 2570af302Sopenharmony_ci#include <signal.h> 3570af302Sopenharmony_ci#include <stdio.h> 4570af302Sopenharmony_ci#include <stdlib.h> 5570af302Sopenharmony_ci#include <sys/tgkill.h> 6570af302Sopenharmony_ci#include "test.h" 7570af302Sopenharmony_ci 8570af302Sopenharmony_ci#define ARGV_1 12345 9570af302Sopenharmony_ci#define ARGV_2 34567 10570af302Sopenharmony_ciint main(){ 11570af302Sopenharmony_ci 12570af302Sopenharmony_ci int tgid, tid; 13570af302Sopenharmony_ci tgid = ARGV_1; 14570af302Sopenharmony_ci tid = ARGV_2; 15570af302Sopenharmony_ci 16570af302Sopenharmony_ci if (tgkill(tgid, tid, SIGPROF) == -1 && errno != ESRCH) { 17570af302Sopenharmony_ci perror("tgkill failed"); 18570af302Sopenharmony_ci } 19570af302Sopenharmony_ci 20570af302Sopenharmony_ci return 0; 21570af302Sopenharmony_ci}