Subversion リポジトリの参照
Diff of /trunk/1.6.x/ccs-tools/ccstools/candy.c
Parent Directory
| Revision Log
| Patch
6 |
* |
* |
7 |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
8 |
* |
* |
9 |
* Version: 1.6.5-pre 2008/10/20 |
* Version: 1.6.5-pre 2008/10/23 |
10 |
*/ |
*/ |
11 |
#include <stdio.h> |
#include <stdio.h> |
12 |
#include <string.h> |
#include <string.h> |
25 |
return shell; |
return shell; |
26 |
} |
} |
27 |
|
|
28 |
static int GetStartTime(pid_t pid, unsigned long long *t) |
static int get_start_time(pid_t pid, unsigned long long *t) |
29 |
{ |
{ |
30 |
FILE *fp; |
FILE *fp; |
31 |
int i; |
int i; |
66 |
if (shell && !strcmp(buffer, passwd)) { |
if (shell && !strcmp(buffer, passwd)) { |
67 |
unsigned long long t0; |
unsigned long long t0; |
68 |
unsigned long long t1; |
unsigned long long t1; |
69 |
if (GetStartTime(getppid(), &t0) == 0 && |
if (get_start_time(getppid(), &t0) == 0 && |
70 |
GetStartTime(getpid(), &t1) == 0) { |
get_start_time(getpid(), &t1) == 0) { |
71 |
/* 10 sec */ |
/* 10 sec */ |
72 |
if ((t1 - t0) < 1000) |
if ((t1 - t0) < 1000) |
73 |
execlp(shell, shell, NULL); |
execlp(shell, shell, NULL); |
|
Legend:
Removed from v.1743 |
|
changed lines |
|
Added in v.1744 |
|
|
| |