bugGNUstep - Bugs: bug #10113, Patch for kvm_code on FreeBSD 5 to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10113: Patch for kvm_code on FreeBSD 5 to allow running without /proc

Submitted by:  Pete French <minusbat>
Submitted on:  Mon 23 Aug 2004 03:34:45 PM UTC  
 
Category: Base/FoundationSeverity: 4 - Important
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Adam Fedor <fedor>
Open/Closed: Closed

Thu 26 Aug 2004 02:48:22 PM UTC, comment #3:
  • Source/NSProcessInfo.m ([NSProcessInfo +load]): Get environment

variables via environ even #ifdef HAVE_KVM (fix/based on #10113).

Adam Fedor <fedor>
Project AdministratorIn charge of this item.
Tue 24 Aug 2004 09:20:21 AM UTC, comment #2:

If we check kvm_getenvv at runtime then it will always produce an error to stderr when it fails. There seems to be no way of suppressing this - and I dont think its goot to have code producing errors every time it runs. Thats just going to lead to umpteen questions and bug reports.

If we check to see if it works at compile time and set an approrpiate #ifdef then we have a situation where code compiled on an earlir FreeBSD system will not run on a later system - which breaks backward compatibility in a very bad way. It also means that code compiled on a FreeBSD system with /proc mounted will not then run on other systems where it is dismounted... again a very bad thing as a lot of developers (myself included) run our development systems with /proc mounted as standard.

I didnt like the idea of the #ifdef FreeBSD ether - but as it stands the kvm code only works properly on FreeBSD anyway, so it didnt seem too much of a loss. We could go for the option of always using environ though. I think that is always supposed to work everywhere... whatever you think is most portbale really

Pete French <minusbat>
Tue 24 Aug 2004 04:10:47 AM UTC, comment #1:

it seems a shame to use #ifdef _FREEBSD_ if we could have the problem on other systems. Why not just check if kvm_getenv works, and if not, use the environ variable? In fact, maybe we should just always use the environ variable since that should work everywhere?

Adam Fedor <fedor>
Project AdministratorIn charge of this item.
Mon 23 Aug 2004 03:34:45 PM UTC, original submission:

The KVM code used by FreeBSD to read argv and envp requires
/proc to be mounted for the envrionemtne to read properly.
This is not true by default on FreeBSD system of 5 and above.

The attached patch alters the code to always use the static
environment pointer on FreeBSD, even when using KVM. This
allows the code to work properly on FreeBSD 5, whilst also
working on previous versions.

Pete French <minusbat>

 

Attached Files
file #1666:  kvm_fbsd.cdiff.gz.uue added by minusbat (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 26 Aug 2004 02:48:22 PM UTCfedorStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Tue 24 Aug 2004 02:24:49 AM UTCfedorSeverity3 - Normal=>4 - Important
  Assigned toNone=>fedor
Mon 23 Aug 2004 03:34:45 PM UTCminusbatAttached File-=>Added kvm_fbsd.cdiff.gz.uue, #1596

Back to the top


Powered by Savane 3.1-cleanup1