From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Epiphanov Sergei To: ALT Linux Sisyphus discussion list Subject: Re: [sisyphus] =?koi8-r?b?8MHLxdQ=?= bluemote Date: Tue, 7 Jun 2005 10:36:14 +0400 User-Agent: KMail/1.8 References: <42A3596E.2060908@gmail.com> <42A4744A.10504@gmail.com> <200506070959.48191.serpiph@nikiet.ru> In-Reply-To: <200506070959.48191.serpiph@nikiet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Disposition: inline Message-Id: <200506071036.14631.serpiph@nikiet.ru> Content-Transfer-Encoding: quoted-printable X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2005 06:35:10 -0000 Archived-At: List-Archive: =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 7 =E9=C0=CE=D8 2005 09:59 Epiphano= v Sergei =CE=C1=D0=C9=D3=C1=CC: > =F7 =D3=CF=CF=C2=DD=C5=CE=C9=C9 =CF=D4 6 =E9=C0=CE=D8 2005 20:05 Dmitry= (Mothlike) Marochko =CE=C1=D0=C9=D3=C1=CC: > > =F0=D2=C9=CD=C5=D2=CE=CF =D0=CF=CE=D1=CC. =E1 =C7=C4=C5 =D7=DA=D1=D4=D8= =D4=CF=D4 =D3=C1=CD=D9=CA n? =E9=D3=D0=CF=CC=D8=DA=CF=D7=C1=D4=D8 =D7 =CB= =C1=DE=C5=D3=D4=D7=C5 =C5=C7=CF > > MAXLEN? > > =E4=C1. =E8=CF=D4=D1, =CE=C1=D3=CB=CF=CC=D8=CB=CF =CD=CE=C5 =C9=DA=D7=C5= =D3=D4=CE=CF, =C5=D3=D4=D8 =CB=CF=CE=D3=D4=C1=CE=D4=C1 =CD=C1=CB=D3=C9=CD= =C1=CC=D8=CE=CF=CA =C4=CC=C9=CE=D9 =D0=D5=D4=C9 =CB > =C6=C1=CA=CC=D5 =D7=CD=C5=D3=D4=C5 =D3 =C9=CD=C5=CE=C5=CD =C6=C1=CA=CC=C1= , =CB=CF=D4=CF=D2=C1=D1 =C2=D9=CC=C1 =D2=C1=D7=CE=C1 4096. > > =EE=C1=DB=A3=CC, =D7 =C6=C1=CA=CC=C5 linux/limits.h: > > #define PATH_MAX 4096 /* # chars in a path name including nul= */ > > =F4=C1=CB =DE=D4=CF =D0=CF=D3=CF=D7=C5=D4=CF=D7=C1=CC =C2=D9 =D7=C5=DA=C4= =C5 MAXLEN =DA=C1=CD=C5=CE=C9=D4=D8 =CE=C1 PATH_MAX. =F4=CF =C5=D3=D4=D8 =D7 =C4=C1=CE=CE=CF=CD =D3=CC=D5=DE=C1=C5 char lockfile[MAXLEN]; =DA=C1=CD=C5=CE=C9=D4=D8 =CE=C1 char lockfile[PATH_MAX]; =F0=C5=D2=C5=C4 =C9=D3=D0=CF=CC=D8=DA=CF=D7=C1=CE=C9=C5=CD =DC=D4=CF=CA =D0= =C5=D2=C5=CD=C5=CE=CE=CF=CA =D1 =C2=D9 =CE=C1=D0=C9=D3=C1=CC bzero (lockfile, PATH_MAX); =C9=CC=C9 lockfile[PATH_MAX - 1] =3D 0; =E7=CC=C1=D7=CE=CF=C5 - =DE=D4=CF=C2=D9 =D0=CF=D3=CC=C5=C4=CE=C9=CA =C2=C1= =CA=D4 =D3=D4=D2=CF=CB=C9 =D7=D3=C5=C7=C4=C1 =C2=D9=CC =C2=D9 =CE=D5=CC=C5= =D7=D9=CD. =FC=D4=CF =CE=C1 =D3=CC=D5=DE=C1=CA,=20 =C5=D3=CC=C9 =C9=D3=C8=CF=C4=CE=C1=D1 =D3=D4=D2=CF=CB=C1 =C2=D5=C4=C5=D4 = =C2=CF=CC=D8=DB=C5 PATH_MAX. =E4=C1=CC=C5=C5, =DA=C1=CD=C5=CE=C9=D4=D8 =CB= =CF=CD=C1=CE=C4=D9 =D7=C9=C4=C1 strcpy (lockfile, srcfile); =CE=C1 strncpy (lockfile, srcfile, PATH_MAX - 1); =F4=CF=D6=C5 =D3=C1=CD=CF=C5 =D3 sprintf (=CE=C1 snprintf) =C9 =C4=D2=D5=C7= =C9=CD=C9. =E9 =CE=C5 =DA=C1=C2=D9=D4=D8 =D7 =CE=C1=DE=C1=CC=C5=20 =C9=D3=D0=D2=C1=D7=CC=C5=CE=CE=D9=C8 =C6=C1=CA=CC=CF=D7 =C4=CF=C2=C1=D7=C9= =D4=D8 #include --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E5=D0=C9=C6=C1=CE=CF=D7 =F3=C5=D2=C7=C5= =CA