From c89e42cf158941545540ad4f8e94f478dec50c1a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 13 Jan 2009 16:01:06 +0000 Subject: Modified fs.lua to survive nil parameters. Added create_directory and used within create_file and write_file. Reviewed each read_file call to make sure handles nil return value. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/processinfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/processinfo.lua') diff --git a/lib/processinfo.lua b/lib/processinfo.lua index f071ed0..736cfd2 100644 --- a/lib/processinfo.lua +++ b/lib/processinfo.lua @@ -188,7 +188,7 @@ local function has_pidfile(name) -- this allows us to find init scripts with differing process names and avoids the problem with -- proc numbers wrapping file = string.match(file, "^%s*(.*%S)") - local tmp = string.match(fs.read_file(file), "%d+") + local tmp = string.match(fs.read_file(file) or "", "%d+") if tmp then local dir = "/proc/" .. tmp filetime = posix.stat(file, "ctime") -- cgit v1.2.3